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/index.js
CHANGED
|
@@ -4581,7 +4581,7 @@ var Editable = function Editable(props) {
|
|
|
4581
4581
|
state.isDraggingInternally = false;
|
|
4582
4582
|
}, [readOnly, attributes.onDragEnd]),
|
|
4583
4583
|
onFocus: React.useCallback(function (event) {
|
|
4584
|
-
if (!readOnly && !state.isUpdatingSelection && ReactEditor.
|
|
4584
|
+
if (!readOnly && !state.isUpdatingSelection && ReactEditor.hasEditableTarget(editor, event.target) && !isEventHandled(event, attributes.onFocus)) {
|
|
4585
4585
|
var el = ReactEditor.toDOMNode(editor, editor);
|
|
4586
4586
|
var root = ReactEditor.findDocumentOrShadowRoot(editor);
|
|
4587
4587
|
state.latestElement = root.activeElement; // COMPAT: If the editor has nested editable elements, the focus
|