@magic-marker/prosemirror-suggest-changes 0.2.1-block-join.6 → 0.2.1-block-join.7
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.
|
@@ -98,18 +98,12 @@ export function isEnsureSelectionEnabled() {
|
|
|
98
98
|
function isPosValid($pos) {
|
|
99
99
|
// text selection is only valid in nodes that allow inline content
|
|
100
100
|
// https://github.com/ProseMirror/prosemirror-state/blob/1.4.4/src/selection.ts#L219
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
// {
|
|
108
|
-
// $pos,
|
|
109
|
-
// },
|
|
110
|
-
// );
|
|
111
|
-
// return false;
|
|
112
|
-
// }
|
|
101
|
+
if (!$pos.parent.inlineContent) {
|
|
102
|
+
trace("isPosValid", $pos.pos, "pos invalid", "reason: not in inlineContent node", {
|
|
103
|
+
$pos
|
|
104
|
+
});
|
|
105
|
+
return false;
|
|
106
|
+
}
|
|
113
107
|
const { deletion, insertion } = getSuggestionMarks($pos.doc.type.schema);
|
|
114
108
|
const deletionBefore = deletion.isInSet($pos.nodeBefore?.marks ?? []);
|
|
115
109
|
const deletionAfter = deletion.isInSet($pos.nodeAfter?.marks ?? []);
|