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.
@@ -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)