@codemirror/view 6.35.2 → 6.35.3
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 +10 -0
- package/dist/index.cjs +3 -1
- package/dist/index.js +3 -1
- package/package.json +2 -2
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,13 @@
|
|
|
1
|
+
## 6.35.3 (2024-12-09)
|
|
2
|
+
|
|
3
|
+
### Bug fixes
|
|
4
|
+
|
|
5
|
+
Fix an issue where mark decorations that got merged or split weren't properly redrawn.
|
|
6
|
+
|
|
7
|
+
Avoid spurious focus events by not updating the DOM selection when the editor is unfocused but focusable.
|
|
8
|
+
|
|
9
|
+
Disable `writingsuggestions` for the editable element, to opt out of Safari's new intelligence completions (which mess up in the editor).
|
|
10
|
+
|
|
1
11
|
## 6.35.2 (2024-12-07)
|
|
2
12
|
|
|
3
13
|
### Bug fixes
|
package/dist/index.cjs
CHANGED
|
@@ -2927,7 +2927,7 @@ class DocView extends ContentView {
|
|
|
2927
2927
|
if (mustRead || !this.view.observer.selectionRange.focusNode)
|
|
2928
2928
|
this.view.observer.readSelectionRange();
|
|
2929
2929
|
let activeElt = this.view.root.activeElement, focused = activeElt == this.dom;
|
|
2930
|
-
let selectionNotFocus = !focused &&
|
|
2930
|
+
let selectionNotFocus = !focused && !(this.view.state.facet(editable) || this.dom.tabIndex > -1) &&
|
|
2931
2931
|
hasSelection(this.dom, this.view.observer.selectionRange) && !(activeElt && this.dom.contains(activeElt));
|
|
2932
2932
|
if (!(focused || fromPointer || selectionNotFocus))
|
|
2933
2933
|
return;
|
|
@@ -3353,6 +3353,7 @@ let DecorationComparator$1 = class DecorationComparator {
|
|
|
3353
3353
|
}
|
|
3354
3354
|
compareRange(from, to) { addRange(from, to, this.changes); }
|
|
3355
3355
|
comparePoint(from, to) { addRange(from, to, this.changes); }
|
|
3356
|
+
boundChange(pos) { addRange(pos, pos, this.changes); }
|
|
3356
3357
|
};
|
|
3357
3358
|
function findChangedDeco(a, b, diff) {
|
|
3358
3359
|
let comp = new DecorationComparator$1;
|
|
@@ -7796,6 +7797,7 @@ class EditorView {
|
|
|
7796
7797
|
spellcheck: "false",
|
|
7797
7798
|
autocorrect: "off",
|
|
7798
7799
|
autocapitalize: "off",
|
|
7800
|
+
writingsuggestions: "false",
|
|
7799
7801
|
translate: "no",
|
|
7800
7802
|
contenteditable: !this.state.facet(editable) ? "false" : "true",
|
|
7801
7803
|
class: "cm-content",
|
package/dist/index.js
CHANGED
|
@@ -2923,7 +2923,7 @@ class DocView extends ContentView {
|
|
|
2923
2923
|
if (mustRead || !this.view.observer.selectionRange.focusNode)
|
|
2924
2924
|
this.view.observer.readSelectionRange();
|
|
2925
2925
|
let activeElt = this.view.root.activeElement, focused = activeElt == this.dom;
|
|
2926
|
-
let selectionNotFocus = !focused &&
|
|
2926
|
+
let selectionNotFocus = !focused && !(this.view.state.facet(editable) || this.dom.tabIndex > -1) &&
|
|
2927
2927
|
hasSelection(this.dom, this.view.observer.selectionRange) && !(activeElt && this.dom.contains(activeElt));
|
|
2928
2928
|
if (!(focused || fromPointer || selectionNotFocus))
|
|
2929
2929
|
return;
|
|
@@ -3349,6 +3349,7 @@ let DecorationComparator$1 = class DecorationComparator {
|
|
|
3349
3349
|
}
|
|
3350
3350
|
compareRange(from, to) { addRange(from, to, this.changes); }
|
|
3351
3351
|
comparePoint(from, to) { addRange(from, to, this.changes); }
|
|
3352
|
+
boundChange(pos) { addRange(pos, pos, this.changes); }
|
|
3352
3353
|
};
|
|
3353
3354
|
function findChangedDeco(a, b, diff) {
|
|
3354
3355
|
let comp = new DecorationComparator$1;
|
|
@@ -7791,6 +7792,7 @@ class EditorView {
|
|
|
7791
7792
|
spellcheck: "false",
|
|
7792
7793
|
autocorrect: "off",
|
|
7793
7794
|
autocapitalize: "off",
|
|
7795
|
+
writingsuggestions: "false",
|
|
7794
7796
|
translate: "no",
|
|
7795
7797
|
contenteditable: !this.state.facet(editable) ? "false" : "true",
|
|
7796
7798
|
class: "cm-content",
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@codemirror/view",
|
|
3
|
-
"version": "6.35.
|
|
3
|
+
"version": "6.35.3",
|
|
4
4
|
"description": "DOM view component for the CodeMirror code editor",
|
|
5
5
|
"scripts": {
|
|
6
6
|
"test": "cm-runtests",
|
|
@@ -26,7 +26,7 @@
|
|
|
26
26
|
"sideEffects": false,
|
|
27
27
|
"license": "MIT",
|
|
28
28
|
"dependencies": {
|
|
29
|
-
"@codemirror/state": "^6.
|
|
29
|
+
"@codemirror/state": "^6.5.0",
|
|
30
30
|
"style-mod": "^4.1.0",
|
|
31
31
|
"w3c-keyname": "^2.2.4"
|
|
32
32
|
},
|