Preview does not auto-scroll relative to the cursor in Editor #3141
Labels
discussion 💬
Issue concerns a discussion.
improvement request 🔨
Issue concerns an existing feature that needs improvement.
needs investigation 🔬
Issue requires further investigation to locate or narrow down the problem.
Current behavior
When editing in split-screen mode where the document is too large to fit in a single view pane of the Editor/Preview, the auto-scroll behavior is very erratic. If one attempts to perform an action on the Preview pane like checking/unchecking a checkbox, the page will "jump" ("autoscroll') to some other location, initially to the top of the page based on previous posts that state the intended behavior is that scrolling "follows the cursor".
However, even when one moves the cursor in the Editor view (causing the Preview to scroll to match the Editor position), checking a box in Preview causes both views to "jump" to some other location that is NOT necessarily where the cursor is in Editor. I have put the cursor in different locations in the document trying to see if auto-scrolling does follow the cursor in Editor, but it doesn't seem to follow any predictable pattern. Sometime is will jump to some location near the cursor location and sometimes it still jumps back to the top.
While moving the cursor in Editor often doesn't change the "auto-scroll to" location, the only thing that sometimes changes the location is actually editing text in the Editor pane and then the location to where Preview will jump will change, but I still cannot identify a pattern as to what this location is supposed to represent.
This is much like the behavior described in #2553 however the location to which the Preview pane scrolls is not consistent to where the cursor is in the Editor which I believe is why this issues was considered fixed and closed.
Expected behavior
Ideally, if you are checking a box in Preview mode, the cursor should follow the action in Preview. This makes the most sense to me, but perhaps there is a good reason to always have the page jump back to where the cursor is in the editor, but I am not sure why this is necessary. Just because the cursor may be somewhere else in the document doesn't mean it needs to be in the pane of view, but it is the act of changing something through Preview that illicit this strange behavior described above.
In other words, whether the view pane jumps to where the cursor is or not, it presently doesn't work anyway. It would seem that the first order of business would be to at least fix the behavior so it behaves according to the intended design so that a user can at least get consistent results.
Once that is addressed, then perhaps there could be an option to allow the user to decide to have the view pane jump to where the cursor is when making a change in Preview. If the app is going to allow the user to check or uncheck check boxes, this behavior should be at the very least predictable!
Steps to reproduce
Environment
The text was updated successfully, but these errors were encountered: