slate-react 0.87.0 → 0.87.1
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 +1 -1
- package/dist/index.es.js.map +1 -1
- package/dist/index.js +1 -1
- package/dist/index.js.map +1 -1
- package/dist/slate-react.js +1 -1
- package/dist/slate-react.min.js +1 -1
- package/package.json +1 -1
package/dist/slate-react.js
CHANGED
|
@@ -5491,7 +5491,7 @@
|
|
|
5491
5491
|
state.isDraggingInternally = false;
|
|
5492
5492
|
}, [readOnly, attributes.onDragEnd]),
|
|
5493
5493
|
onFocus: React.useCallback(function (event) {
|
|
5494
|
-
if (!readOnly && !state.isUpdatingSelection && ReactEditor.
|
|
5494
|
+
if (!readOnly && !state.isUpdatingSelection && ReactEditor.hasEditableTarget(editor, event.target) && !isEventHandled(event, attributes.onFocus)) {
|
|
5495
5495
|
var el = ReactEditor.toDOMNode(editor, editor);
|
|
5496
5496
|
var root = ReactEditor.findDocumentOrShadowRoot(editor);
|
|
5497
5497
|
state.latestElement = root.activeElement; // COMPAT: If the editor has nested editable elements, the focus
|