slate-angular 20.2.16 → 20.2.17

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.
@@ -3952,6 +3952,9 @@ class SlateEditable {
3952
3952
  if (editorElement.contains(domSelection.anchorNode) && editorElement.contains(domSelection.focusNode)) {
3953
3953
  hasDomSelectionInEditor = true;
3954
3954
  }
3955
+ if (!hasDomSelectionInEditor && !AngularEditor.isFocused(this.editor)) {
3956
+ return;
3957
+ }
3955
3958
  // If the DOM selection is in the editor and the editor selection is already correct, we're done.
3956
3959
  if (hasDomSelection && hasDomSelectionInEditor && selection && hasStringTarget(domSelection)) {
3957
3960
  const rangeFromDOMSelection = AngularEditor.toSlateRange(this.editor, domSelection, {