Option to prevent scrolling up after preview refresh #7190
Replies: 3 comments
-
this would be useful! |
Beta Was this translation helpful? Give feedback.
-
For me, --navigate is working with Chromium, but not with Firefox. Also works with VSCode built-in browser. Already a great help, though. |
Beta Was this translation helpful? Give feedback.
-
In the meantime I realised that this functionality already exists at least for the VS Code built-in preview; I think this post was prompted by that feature failing with a specific old Quarto version. I'm not closing it because the original post has a few upvotes, and while I'm happy now maybe there is actually something to be improved. |
Beta Was this translation helpful? Give feedback.
-
Description
This is related to #3648, but not exactly the same. There @fecet requested synchronization between the position in the editor position and the position in the HTML preview, which would of course be at least partially editor-specific and therefore not (exclusively) a
quarto-cli
issue.For me it would be sufficient to have an option which prevents each refresh of
quarto preview
from scrolling to the top of the document. That behavior is really inconvenient, in particular when editing complex input where keeping an eye on the preview is helpful, and when the edited part is further down in a long document.I did some digging, and found that
quarto preview
has an option--no-navigate
which seems to do this, and it works with the preview in an external browser if I startquarto preview
manually. However, there seems to be no way to request issuing this option toquarto preview
when started from an editor or IDE.I propose to add a YAML option
navigate
with boolean value (e.g. under theeditor
key) wherenavigate: false
has the same effect as the--no-navigate
option.Beta Was this translation helpful? Give feedback.
All reactions