madflow / flow-netbeans-markdown

Markdown file support for the NetBeans IDE
MIT License
279 stars 40 forks source link

Preserve scroll position in preview #89

Closed stengerh closed 9 years ago

stengerh commented 9 years ago

An attempt at preserving - or rather restoring - the scroll position in the JavaFX based preview. The preview may flicker or jerk to the top while the updated HTML loads. This effect may be unnoticeable on short documents which appear to update instantly. Embedded images make the effect very noticeable, especially if they are loaded from a remote server

See also #42.

madflow commented 9 years ago

I tested the changes with this document: http://daringfireball.net/projects/markdown/index.text

I can reproduce the restored scroll position - but only in the first few sections. When I scroll down to approx. "Blosxom" in the document and switch from preview to editor and back - I always end up at the top again. I am on Linux machine.

stengerh commented 9 years ago

Thanks for the feedback! I tested this on Windows 8.1 with the source and preview views side-by-side in a split editor window. I'll look into it.

stengerh commented 9 years ago

This issue should be fixed now.

Note to self: remember to think twice before using MessageFormat to generate program code. It includes thousands separators by default.

madflow commented 9 years ago

Thanks! I tested some more and it looks fine. I went ahead and merged the PR for easier collaborative testing (feel free to use your merge rights in the future ;) )

stengerh commented 9 years ago

Okay, I had deliberately used a pull request to enable discussion about the proposed changes. ;)