Quarto authoring: losing typing cursor focus when using "render on save"
System details:
Positron and OS details:
Positron Version: 2025.12.0 build 105
Code - OSS Version: 1.105.0
Commit: 98537e9935afc48311e32033c6518a3c89829789
Date: 2025-11-20T07:18:54.863Z
Electron: 37.6.0
Chromium: 138.0.7204.251
Node.js: 22.19.0
V8: 13.8.258.32-electron.0
OS: Darwin arm64 25.1.0
Describe the issue:
When authoring a Quarto document (in "Source" mode), using the "Render on Save" option, saving the file (using cmd + S), makes the cursor leave the typing area and the focus jumps on the viewer window. To continue typing the document, you need to click or cmd + & to regain focus on the editor area breaking typing flow.
Steps to reproduce the issue:
- Type Quarto document in source mode, activating the "Render on Save" option and click the "Preview" button
- Use cmd + S shortcut to save the document
- Notice that the typing cursor is not visible anymore as the focus has moved to the preview window
Expected or desired behavior:
I expect the cursor to stay in the editor window so I can continue typing the document.
Thank you for the feedback @fmichonneau! I am able to repro this and it is quite frustrating, sorry about that. We will investigate!
This is related to work we did in https://github.com/quarto-dev/quarto/pull/699 in the Quarto extension, because the way we were trying to maintain focus turned out to be BAD. 😬
Also, this is the same as https://github.com/posit-dev/positron/issues/10150.
@fmichonneau can you open a feature request in the Quarto extension repo for us to give another try at bringing focus switch back to the editor with render-on-save on?