Skip to content
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

Preview does not auto-scroll relative to the cursor in Editor #3141

Open
hinder90 opened this issue Jul 24, 2019 · 3 comments
Open

Preview does not auto-scroll relative to the cursor in Editor #3141

hinder90 opened this issue Jul 24, 2019 · 3 comments
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.

Comments

@hinder90
Copy link

hinder90 commented Jul 24, 2019

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

  1. In Editor, put the cursor somwhere lower in the document so that the viewer pane shows text at some arbitrary location within the document (as long as it isn't the top) where a checkbox "[ ]" exists.
  2. The Preview pane will momentarily follow to match the location of the editor.
  3. Change the state of the checkbox by checking or unchecking it.
  4. The Preview pane and subsequently the Editor pane will jump to some other location in the document. Initally it just goes back to the top, but after making edits to a page, the location becomes arbitrary and I cannot see any sort of pattern as to where it chooses to go.

Environment

  • Version : Version 0.12.0-0
  • OS Version and name : MacOS 10.14.5
@Flexo013
Copy link
Contributor

Thanks for creating a new issue for this problem! I currently am unable to investigate this issue further as we don't have a functional 0.12.0-0 build for Windows 10, but rest assured that we will take a look at this.

@Flexo013 Flexo013 added 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. labels Jul 24, 2019
@noklam
Copy link

noklam commented Jul 25, 2019

same issue, the preview side always scroll up to the toc whenever you type anything.

@Flexo013
Copy link
Contributor

@noklam That bug will be fixed by #3177

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
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.
Projects
None yet
Development

No branches or pull requests

3 participants