@portabletext/editor 2.6.4 → 2.6.5

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/lib/index.js CHANGED
@@ -7,7 +7,7 @@ import noop from "lodash/noop.js";
7
7
  import { Element as Element$1, Text, Range, Editor, Node, Transforms, Path, Operation, deleteText, setSelection, Point, createEditor } from "slate";
8
8
  import { useSelected, useSlateSelector, useSlateStatic, withReact, ReactEditor, Slate, useSlate, Editable } from "slate-react";
9
9
  import debug$f from "debug";
10
- import { DOMEditor, isDOMNode, EDITOR_TO_PENDING_SELECTION } from "slate-dom";
10
+ import { DOMEditor, isDOMNode, EDITOR_TO_PENDING_SELECTION, IS_FOCUSED, IS_READ_ONLY } from "slate-dom";
11
11
  import { getBlockStartPoint, getBlockKeyFromSelectionPoint, getChildKeyFromSelectionPoint, blockOffsetToSpanSelectionPoint, parseBlock, parseAnnotation, parseInlineObject, isKeyedSegment, isListBlock, isTypedObject, getSelectionStartPoint, getSelectionEndPoint, getTextBlockText, parseBlocks } from "./_chunks-es/util.slice-blocks.js";
12
12
  import { getBlockEndPoint, isSelectionCollapsed, isEqualSelectionPoints, isEmptyTextBlock } from "./_chunks-es/util.is-selection-collapsed.js";
13
13
  import isEqual from "lodash/isEqual.js";
@@ -3718,7 +3718,7 @@ const moveBackwardOperationImplementation = ({
3718
3718
  },
3719
3719
  blockIndexMap: operation.editor.blockIndexMap
3720
3720
  });
3721
- newSelection ? Transforms.select(operation.editor, newSelection) : Transforms.deselect(operation.editor);
3721
+ newSelection ? Transforms.select(operation.editor, newSelection) : Transforms.deselect(operation.editor), IS_FOCUSED.get(operation.editor) && IS_READ_ONLY.get(operation.editor) && IS_FOCUSED.set(operation.editor, !1);
3722
3722
  }, behaviorOperationImplementations = {
3723
3723
  "annotation.add": addAnnotationOperationImplementation,
3724
3724
  "annotation.remove": removeAnnotationOperationImplementation,