@codemirror/view 6.15.1 → 6.15.2
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/CHANGELOG.md +6 -0
- package/dist/index.cjs +3 -3
- package/dist/index.js +3 -3
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
package/dist/index.cjs
CHANGED
|
@@ -2993,8 +2993,7 @@ function findCompositionNode(view) {
|
|
|
2993
2993
|
}
|
|
2994
2994
|
}
|
|
2995
2995
|
}
|
|
2996
|
-
|
|
2997
|
-
return from > main.head || to < main.head ? null : { from, to, node: textNode };
|
|
2996
|
+
return { from, to, node: textNode };
|
|
2998
2997
|
}
|
|
2999
2998
|
function findCompositionRange(view, changes) {
|
|
3000
2999
|
let found = findCompositionNode(view);
|
|
@@ -3020,7 +3019,8 @@ function findCompositionRange(view, changes) {
|
|
|
3020
3019
|
else
|
|
3021
3020
|
return null;
|
|
3022
3021
|
}
|
|
3023
|
-
|
|
3022
|
+
let { main } = view.state.selection;
|
|
3023
|
+
if (view.state.doc.sliceString(fromB, toB) != text || fromB > main.head || toB < main.head)
|
|
3024
3024
|
return null;
|
|
3025
3025
|
let marks = [];
|
|
3026
3026
|
let range = new ChangedRange(fromA, toA, fromB, toB);
|
package/dist/index.js
CHANGED
|
@@ -2987,8 +2987,7 @@ function findCompositionNode(view) {
|
|
|
2987
2987
|
}
|
|
2988
2988
|
}
|
|
2989
2989
|
}
|
|
2990
|
-
|
|
2991
|
-
return from > main.head || to < main.head ? null : { from, to, node: textNode };
|
|
2990
|
+
return { from, to, node: textNode };
|
|
2992
2991
|
}
|
|
2993
2992
|
function findCompositionRange(view, changes) {
|
|
2994
2993
|
let found = findCompositionNode(view);
|
|
@@ -3014,7 +3013,8 @@ function findCompositionRange(view, changes) {
|
|
|
3014
3013
|
else
|
|
3015
3014
|
return null;
|
|
3016
3015
|
}
|
|
3017
|
-
|
|
3016
|
+
let { main } = view.state.selection;
|
|
3017
|
+
if (view.state.doc.sliceString(fromB, toB) != text || fromB > main.head || toB < main.head)
|
|
3018
3018
|
return null;
|
|
3019
3019
|
let marks = [];
|
|
3020
3020
|
let range = new ChangedRange(fromA, toA, fromB, toB);
|