slate-react 0.91.2 → 0.91.3-2023122205352
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.es.js +3 -3
- package/dist/index.es.js.map +1 -1
- package/dist/index.js +3 -3
- package/dist/index.js.map +1 -1
- package/dist/plugin/with-react.d.ts.map +1 -1
- package/dist/slate-react.js +3 -3
- package/dist/slate-react.min.js +1 -1
- package/package.json +3 -3
package/dist/index.es.js
CHANGED
|
@@ -4481,7 +4481,7 @@ var Editable = props => {
|
|
|
4481
4481
|
}
|
|
4482
4482
|
}, [readOnly, attributes.onKeyDown]),
|
|
4483
4483
|
onPaste: useCallback(event => {
|
|
4484
|
-
if (!readOnly && ReactEditor.
|
|
4484
|
+
if (!readOnly && ReactEditor.hasEditableTarget(editor, event.target) && !isEventHandled(event, attributes.onPaste)) {
|
|
4485
4485
|
// COMPAT: Certain browsers don't support the `beforeinput` event, so we
|
|
4486
4486
|
// fall back to React's `onPaste` here instead.
|
|
4487
4487
|
// COMPAT: Firefox, Chrome and Safari don't emit `beforeinput` events
|
|
@@ -5171,7 +5171,7 @@ var withReact = function withReact(editor) {
|
|
|
5171
5171
|
return false;
|
|
5172
5172
|
};
|
|
5173
5173
|
|
|
5174
|
-
e.onChange =
|
|
5174
|
+
e.onChange = options => {
|
|
5175
5175
|
// COMPAT: React doesn't batch `setState` hook calls, which means that the
|
|
5176
5176
|
// children and selection can get out of sync for one render pass. So we
|
|
5177
5177
|
// have to use this unstable API to ensure it batches them. (2019/12/03)
|
|
@@ -5183,7 +5183,7 @@ var withReact = function withReact(editor) {
|
|
|
5183
5183
|
onContextChange();
|
|
5184
5184
|
}
|
|
5185
5185
|
|
|
5186
|
-
onChange();
|
|
5186
|
+
onChange(options);
|
|
5187
5187
|
});
|
|
5188
5188
|
};
|
|
5189
5189
|
|