@codemirror/view 6.28.2 → 6.28.4
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 +12 -0
- package/dist/index.cjs +3 -2
- package/dist/index.js +3 -2
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,15 @@
|
|
|
1
|
+
## 6.28.4 (2024-07-03)
|
|
2
|
+
|
|
3
|
+
### Bug fixes
|
|
4
|
+
|
|
5
|
+
Fix a bug where EditContext-based editing could corrupt the document in some situations.
|
|
6
|
+
|
|
7
|
+
## 6.28.3 (2024-07-01)
|
|
8
|
+
|
|
9
|
+
### Bug fixes
|
|
10
|
+
|
|
11
|
+
Fix an issue causing the IME interface to appear in the wrong spot on Chrome Windows.
|
|
12
|
+
|
|
1
13
|
## 6.28.2 (2024-06-21)
|
|
2
14
|
|
|
3
15
|
### Bug fixes
|
package/dist/index.cjs
CHANGED
|
@@ -7106,7 +7106,7 @@ class EditContextManager {
|
|
|
7106
7106
|
change.from = anchor;
|
|
7107
7107
|
else if (change.to == this.to && anchor > this.to)
|
|
7108
7108
|
change.to = anchor;
|
|
7109
|
-
// Edit
|
|
7109
|
+
// Edit contexts sometimes fire empty changes
|
|
7110
7110
|
if (change.from == change.to && !change.insert.length)
|
|
7111
7111
|
return;
|
|
7112
7112
|
this.pendingContextChange = change;
|
|
@@ -7120,7 +7120,7 @@ class EditContextManager {
|
|
|
7120
7120
|
let rects = [], prev = null;
|
|
7121
7121
|
for (let i = this.toEditorPos(e.rangeStart), end = this.toEditorPos(e.rangeEnd); i < end; i++) {
|
|
7122
7122
|
let rect = view.coordsForChar(i);
|
|
7123
|
-
prev = (rect && new DOMRect(rect.left, rect.
|
|
7123
|
+
prev = (rect && new DOMRect(rect.left, rect.top, rect.right - rect.left, rect.bottom - rect.top))
|
|
7124
7124
|
|| prev || new DOMRect;
|
|
7125
7125
|
rects.push(prev);
|
|
7126
7126
|
}
|
|
@@ -7165,6 +7165,7 @@ class EditContextManager {
|
|
|
7165
7165
|
if (pending.from == fromA && pending.to == toA && pending.insert.eq(insert)) {
|
|
7166
7166
|
pending = this.pendingContextChange = null; // Match
|
|
7167
7167
|
off += dLen;
|
|
7168
|
+
this.to += dLen;
|
|
7168
7169
|
return;
|
|
7169
7170
|
}
|
|
7170
7171
|
else { // Mismatch, revert
|
package/dist/index.js
CHANGED
|
@@ -7101,7 +7101,7 @@ class EditContextManager {
|
|
|
7101
7101
|
change.from = anchor;
|
|
7102
7102
|
else if (change.to == this.to && anchor > this.to)
|
|
7103
7103
|
change.to = anchor;
|
|
7104
|
-
// Edit
|
|
7104
|
+
// Edit contexts sometimes fire empty changes
|
|
7105
7105
|
if (change.from == change.to && !change.insert.length)
|
|
7106
7106
|
return;
|
|
7107
7107
|
this.pendingContextChange = change;
|
|
@@ -7115,7 +7115,7 @@ class EditContextManager {
|
|
|
7115
7115
|
let rects = [], prev = null;
|
|
7116
7116
|
for (let i = this.toEditorPos(e.rangeStart), end = this.toEditorPos(e.rangeEnd); i < end; i++) {
|
|
7117
7117
|
let rect = view.coordsForChar(i);
|
|
7118
|
-
prev = (rect && new DOMRect(rect.left, rect.
|
|
7118
|
+
prev = (rect && new DOMRect(rect.left, rect.top, rect.right - rect.left, rect.bottom - rect.top))
|
|
7119
7119
|
|| prev || new DOMRect;
|
|
7120
7120
|
rects.push(prev);
|
|
7121
7121
|
}
|
|
@@ -7160,6 +7160,7 @@ class EditContextManager {
|
|
|
7160
7160
|
if (pending.from == fromA && pending.to == toA && pending.insert.eq(insert)) {
|
|
7161
7161
|
pending = this.pendingContextChange = null; // Match
|
|
7162
7162
|
off += dLen;
|
|
7163
|
+
this.to += dLen;
|
|
7163
7164
|
return;
|
|
7164
7165
|
}
|
|
7165
7166
|
else { // Mismatch, revert
|