@codemirror/view 6.43.8 → 6.43.9

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 CHANGED
@@ -1,3 +1,9 @@
1
+ ## 6.43.9 (2026-08-16)
2
+
3
+ ### Bug fixes
4
+
5
+ Fix an issue where the scroll position would incorrectly be moved up when a document scrolled to the bottom would lose height.
6
+
1
7
  ## 6.43.8 (2026-08-04)
2
8
 
3
9
  ### Bug fixes
package/dist/index.cjs CHANGED
@@ -8236,10 +8236,12 @@ class EditorView {
8236
8236
  (scroll == this.scrollDOM || this.hasFocus ||
8237
8237
  Math.max(this.inputState.lastWheelEvent, this.inputState.lastTouchTime) > Date.now() - 100)) {
8238
8238
  scrollOffset = scrollOffset + diff;
8239
- if (scroll)
8240
- scroll.scrollTop += diff;
8241
- else
8239
+ if (!scroll)
8242
8240
  this.win.scrollBy(0, diff);
8241
+ else if (scrollAnchorPos < 0)
8242
+ scroll.scrollTop = scroll.scrollHeight;
8243
+ else
8244
+ scroll.scrollTop += diff;
8243
8245
  scrollAnchorHeight = -1;
8244
8246
  continue;
8245
8247
  }
package/dist/index.js CHANGED
@@ -8231,10 +8231,12 @@ class EditorView {
8231
8231
  (scroll == this.scrollDOM || this.hasFocus ||
8232
8232
  Math.max(this.inputState.lastWheelEvent, this.inputState.lastTouchTime) > Date.now() - 100)) {
8233
8233
  scrollOffset = scrollOffset + diff;
8234
- if (scroll)
8235
- scroll.scrollTop += diff;
8236
- else
8234
+ if (!scroll)
8237
8235
  this.win.scrollBy(0, diff);
8236
+ else if (scrollAnchorPos < 0)
8237
+ scroll.scrollTop = scroll.scrollHeight;
8238
+ else
8239
+ scroll.scrollTop += diff;
8238
8240
  scrollAnchorHeight = -1;
8239
8241
  continue;
8240
8242
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@codemirror/view",
3
- "version": "6.43.8",
3
+ "version": "6.43.9",
4
4
  "description": "DOM view component for the CodeMirror code editor",
5
5
  "scripts": {
6
6
  "test": "cm-runtests",