slate-react 0.87.0 → 0.87.1-20221114164519

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 CHANGED
@@ -4098,7 +4098,7 @@ var Editable = props => {
4098
4098
  state.isDraggingInternally = false;
4099
4099
  }, [readOnly, attributes.onDragEnd]),
4100
4100
  onFocus: useCallback(event => {
4101
- if (!readOnly && !state.isUpdatingSelection && ReactEditor.hasSelectableTarget(editor, event.target) && !isEventHandled(event, attributes.onFocus)) {
4101
+ if (!readOnly && !state.isUpdatingSelection && ReactEditor.hasEditableTarget(editor, event.target) && !isEventHandled(event, attributes.onFocus)) {
4102
4102
  var el = ReactEditor.toDOMNode(editor, editor);
4103
4103
  var root = ReactEditor.findDocumentOrShadowRoot(editor);
4104
4104
  state.latestElement = root.activeElement; // COMPAT: If the editor has nested editable elements, the focus