slate-react 0.91.6 → 0.91.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/components/editable.d.ts.map +1 -1
- package/dist/index.es.js +3 -1
- package/dist/index.es.js.map +1 -1
- package/dist/index.js +3 -1
- package/dist/index.js.map +1 -1
- package/dist/slate-react.js +3 -1
- package/dist/slate-react.min.js +1 -1
- package/package.json +1 -1
package/dist/slate-react.js
CHANGED
|
@@ -5605,6 +5605,8 @@
|
|
|
5605
5605
|
}, [readOnly, propsOnDOMBeforeInput]);
|
|
5606
5606
|
var callbackRef = React.useCallback(function (node) {
|
|
5607
5607
|
if (node == null) {
|
|
5608
|
+
onDOMSelectionChange.cancel();
|
|
5609
|
+
scheduleOnDOMSelectionChange.cancel();
|
|
5608
5610
|
EDITOR_TO_ELEMENT["delete"](editor);
|
|
5609
5611
|
NODE_TO_ELEMENT["delete"](editor);
|
|
5610
5612
|
|
|
@@ -5624,7 +5626,7 @@
|
|
|
5624
5626
|
}
|
|
5625
5627
|
|
|
5626
5628
|
ref.current = node;
|
|
5627
|
-
}, [ref, onDOMBeforeInput]); // Attach a native DOM event handler for `selectionchange`, because React's
|
|
5629
|
+
}, [ref, onDOMBeforeInput, onDOMSelectionChange, scheduleOnDOMSelectionChange]); // Attach a native DOM event handler for `selectionchange`, because React's
|
|
5628
5630
|
// built-in `onSelect` handler doesn't fire for all selection changes. It's a
|
|
5629
5631
|
// leaky polyfill that only fires on keypresses or clicks. Instead, we want to
|
|
5630
5632
|
// fire for any change to the selection inside the editor. (2019/11/04)
|