-
-
Notifications
You must be signed in to change notification settings - Fork 116
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Displayed portion of text field moves around (at least while editing CodeMirror 6 fields) #271
Comments
Could you verify the behavior from eMacs towards any other fields here? https://ghosttext.fregante.com/test/ The problem could be two-sided:
|
I edited these fields using my setup, but was not able to induce the buggy behavior, probably for the following reason. The CodeMirror 6 field(s) grow and shrink as lines of text are added and removed in the editor, so that all the text is always visible in the field (no scroll bar). So, the field does not "jump downward" -- it cannot move at all. By contrast, the CodeMirror 5 fields do not grow and shrink (a scroll bar appears when the text grows too big to fit the field). When editing text within the field's view, the text remains in place and the edits are visible. When editing text that is out of view, the field automatically scrolls to make the edits visible (as desired). |
CodeMirror 5 also can grow and shrink: https://codemirror.net/5/ The behavior you're seeing on the test page specifically is due to my own lazy implementation 😅 It seems however that I had misunderstood your initial bug report, so I'll have to try it out myself later this week or next week. |
Can you post a screencast? I don't understand what the issue is. Even on the official CM6 field the scroll position never changes: https://codemirror.net cm6.movSame for CM5: https://codemirror.net/5/ cm5.movAlso please ensure that the bug does not happen with Sublime Text or VS Code |
I can reproduce the issue in Overleaf when typing in the middle of the document. Unfortunately I think this is a custom Overleaf behavior because it only happens at some point/section in the document, suggesting that there's some custom logic behind it. Screen.Recording.1.movGiven that there's no particular reason to look at the field in the browser while you're editing it in your editor, I'm going to close this. There's a chance that this behavior will be fixed as part of: |
Setup
Browser: Chrome 111.0.5563.64 (macOS 13.2.1)
Editor: Emacs mac port
Description
While editing on Overleaf (using the new support for CodeMirror 6; see #238): as I edit text in my emacs window, the displayed document text in the browser window "jumps downward," to points far away from the material being edited.
Specifically, with each keystroke in the editor (insert/delete character), the displayed portion of the document seems to move down by about 10%, until it reaches the end and stays there. If I move back up, each keystroke moves the window back down.
The text was updated successfully, but these errors were encountered: