asciidoctor / atom-asciidoc-preview

⚛ AsciiDoc preview for the Atom editor.
https://atom.io/packages/asciidoc-preview
MIT License
142 stars 42 forks source link

preview jumps back to top #240

Open normoes opened 7 years ago

normoes commented 7 years ago

Description

normoes commented 7 years ago

I just observed the following reproducible behaviour:

Maybe there is connection.

mojavelinux commented 7 years ago

I reproduce it by scrolling within the preview tab to somewhere in the middle and then switch tabs by clicking into the editing field.

You are experiencing the new scroll sync behavior. It syncs the preview to the location of the cursor in the editor. Assuming it's not making any mistakes (which is a possibility), this behavior is expected. You can disable it though in the settings.

normoes commented 7 years ago

Thanks for the reply. Ok, that explains the behaviour I described in the first comment.

The original problem remains (with the scroll sync option active).

For now, I switched it off. Thank you for the tip.

mojavelinux commented 7 years ago

There are still some nodes that aren't mapped correctly, so it could be that it's jumping to the top because it doesn't know where to go. This is still an experimental feature, so we are looking for those types of cases.

normoes commented 7 years ago

Do you need more information then? I am willing to help :+1:

mojavelinux commented 7 years ago

Yes, that would be fantastic. The devil is in the details of the content. We need to know what type of content you clicked on (and with what level of nesting) so we understand the edge case. A sample document is usually best.

ldez commented 7 years ago

I'll close this issue, because I think the question is answered, but feel free to continue the conversation.

mojavelinux commented 7 years ago

Actually, it might not be answered. If the preview is scrolling to the top but the cursor is not at the top, then this is perhaps a bug. We are waiting to verify.

normoes commented 7 years ago

Description

This is my workspace with the some of the code, nothing special here - It goes on like this afterwards and before. When I click alternatively on the preview tab and on the README.asciidoc, I try to click not always in the middle of the README.asciidoc tab - sometimes (far) above the middle or below it, but I never scroll. The top of the screen is by far not the top of the document.

Screenshots

2017-05-18-115005_1225x117_scrot

Syntax example

==== docker volumes in redhat SELinux
[IMPORTANT]
====
On linux distributions using SELinux it is necessary to add `:z` or even better `:Z`
====