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.
@@ -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.hasSelectableTarget(editor, event.target) && !isEventHandled(event, attributes.onFocus)) {
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