@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 +6 -0
- package/dist/index.cjs +5 -3
- package/dist/index.js +5 -3
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
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
|
}
|