jbt / markdown-editor

Live (Github-flavored) Markdown Editor
http://jbt.github.com/markdown-editor
ISC License
2.83k stars 644 forks source link

Editing forces view to automatically scroll unjustly #22

Open gima opened 9 years ago

gima commented 9 years ago

It's useful to see "the full picture" of how the output looks. This new feature makes it hard, as it forcibly scrolls the edited portion into the top of the view pane.

It would be nice if the scrolling didn't happen when the text that's being edited is already in view. It's perfectly valid to scroll the edited portion into view when it's Not visible.

jbt commented 9 years ago

Agreed - the current logic for scrolling is as in #12 which I think is definitely better than not scrolling at all. I'll have another look and see if it can be improved at all. I think using scrollIntoViewIfNeeded might improve things somewhat.