You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In very large documents, if I scroll to various positions in the middle of the document and click around, the scroll position / viewport shifts with each mouse down. It seems to do this until it reaches a "settling point" where it stops shifting on click, but then scrolling to another location and trying clicks again will usually "reset" and exhibit the problem again.
It is also noticeable that gutter line numbers seem to get out of sync while clicking.
Here is a video of what I'm seeing. I click around a few times, and then try to drag to select just a single line.
codemirror_shifting.mp4
This issue makes the editor very hard to use with large documents, as it is hard to accurately select text when the document scrolls while dragging the mouse.
Apologies if this is a known issue or a duplicate, but other issues I found didn't seem to exactly describe this issue.
Height scaling still has some issues #415 describes select all (Ctrl+A) causing some shifting. (It seems like it "corrects" or settles the misalignment upon Ctrl+A.)
I observed that the scrolling shift seems to be coming from this scrollTop update, but I don't know much more than that. It seems like the diff is always a few pixels.
Solving that first shift (caused by selection moving away from the start of the document, removing the need to render the first line, causing it to also be scaled down) would require some invasive code that I'm not sure the weight of the issue justifies.
Thanks for looking into this! I tried the latest @codemirror/view release and it seems to address the problem. Maybe there is some first shift, but it doesn't seem consistent or really that noticeable.
Describe the issue
In very large documents, if I scroll to various positions in the middle of the document and click around, the scroll position / viewport shifts with each mouse down. It seems to do this until it reaches a "settling point" where it stops shifting on click, but then scrolling to another location and trying clicks again will usually "reset" and exhibit the problem again.
It is also noticeable that gutter line numbers seem to get out of sync while clicking.
Here is a video of what I'm seeing. I click around a few times, and then try to drag to select just a single line.
codemirror_shifting.mp4
This issue makes the editor very hard to use with large documents, as it is hard to accurately select text when the document scrolls while dragging the mouse.
Apologies if this is a known issue or a duplicate, but other issues I found didn't seem to exactly describe this issue.
I observed that the scrolling shift seems to be coming from this
scrollTop
update, but I don't know much more than that. It seems like thediff
is always a few pixels.Browser and platform
Chrome (Windows), Firefox 126.0 (Linux)
Reproduction link
https://codemirror.net/examples/million/
The text was updated successfully, but these errors were encountered: