@codemirror/view 6.13.0 → 6.13.1
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 +8 -0
- package/dist/index.cjs +2 -2
- package/dist/index.js +2 -2
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,11 @@
|
|
|
1
|
+
## 6.13.1 (2023-06-12)
|
|
2
|
+
|
|
3
|
+
### Bug fixes
|
|
4
|
+
|
|
5
|
+
Fix a bug where the cursor would in some circumstances be drawn on the wrong side of an inline widget.
|
|
6
|
+
|
|
7
|
+
Fix an issue where `scrollPastEnd` could cause the scroll position of editors that weren't in view to be changed unnecessarily.
|
|
8
|
+
|
|
1
9
|
## 6.13.0 (2023-06-05)
|
|
2
10
|
|
|
3
11
|
### Bug fixes
|
package/dist/index.cjs
CHANGED
|
@@ -897,7 +897,7 @@ class WidgetView extends ContentView {
|
|
|
897
897
|
if (pos > 0 ? i == 0 : i == rects.length - 1 || rect.top < rect.bottom)
|
|
898
898
|
break;
|
|
899
899
|
}
|
|
900
|
-
return
|
|
900
|
+
return flattenRect(rect, !fromBack);
|
|
901
901
|
}
|
|
902
902
|
get isEditable() { return false; }
|
|
903
903
|
get isWidget() { return true; }
|
|
@@ -8407,7 +8407,7 @@ const plugin = ViewPlugin.fromClass(class {
|
|
|
8407
8407
|
update(update) {
|
|
8408
8408
|
let { view } = update;
|
|
8409
8409
|
let height = view.viewState.editorHeight - view.defaultLineHeight - view.documentPadding.top - 0.5;
|
|
8410
|
-
if (height != this.height) {
|
|
8410
|
+
if (height >= 0 && height != this.height) {
|
|
8411
8411
|
this.height = height;
|
|
8412
8412
|
this.attrs = { style: `padding-bottom: ${height}px` };
|
|
8413
8413
|
}
|
package/dist/index.js
CHANGED
|
@@ -893,7 +893,7 @@ class WidgetView extends ContentView {
|
|
|
893
893
|
if (pos > 0 ? i == 0 : i == rects.length - 1 || rect.top < rect.bottom)
|
|
894
894
|
break;
|
|
895
895
|
}
|
|
896
|
-
return
|
|
896
|
+
return flattenRect(rect, !fromBack);
|
|
897
897
|
}
|
|
898
898
|
get isEditable() { return false; }
|
|
899
899
|
get isWidget() { return true; }
|
|
@@ -8400,7 +8400,7 @@ const plugin = /*@__PURE__*/ViewPlugin.fromClass(class {
|
|
|
8400
8400
|
update(update) {
|
|
8401
8401
|
let { view } = update;
|
|
8402
8402
|
let height = view.viewState.editorHeight - view.defaultLineHeight - view.documentPadding.top - 0.5;
|
|
8403
|
-
if (height != this.height) {
|
|
8403
|
+
if (height >= 0 && height != this.height) {
|
|
8404
8404
|
this.height = height;
|
|
8405
8405
|
this.attrs = { style: `padding-bottom: ${height}px` };
|
|
8406
8406
|
}
|