slate-react 0.91.2 → 0.91.3

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/index.js CHANGED
@@ -4961,7 +4961,7 @@ var Editable = function Editable(props) {
4961
4961
  }
4962
4962
  }, [readOnly, attributes.onKeyDown]),
4963
4963
  onPaste: React.useCallback(function (event) {
4964
- if (!readOnly && ReactEditor.hasSelectableTarget(editor, event.target) && !isEventHandled(event, attributes.onPaste)) {
4964
+ if (!readOnly && ReactEditor.hasEditableTarget(editor, event.target) && !isEventHandled(event, attributes.onPaste)) {
4965
4965
  // COMPAT: Certain browsers don't support the `beforeinput` event, so we
4966
4966
  // fall back to React's `onPaste` here instead.
4967
4967
  // COMPAT: Firefox, Chrome and Safari don't emit `beforeinput` events
@@ -5711,7 +5711,7 @@ var withReact = function withReact(editor) {
5711
5711
  return false;
5712
5712
  };
5713
5713
 
5714
- e.onChange = function () {
5714
+ e.onChange = function (options) {
5715
5715
  // COMPAT: React doesn't batch `setState` hook calls, which means that the
5716
5716
  // children and selection can get out of sync for one render pass. So we
5717
5717
  // have to use this unstable API to ensure it batches them. (2019/12/03)
@@ -5723,7 +5723,7 @@ var withReact = function withReact(editor) {
5723
5723
  onContextChange();
5724
5724
  }
5725
5725
 
5726
- onChange();
5726
+ onChange(options);
5727
5727
  });
5728
5728
  };
5729
5729