Skip to content

Improved (less aggressive) editor focus preservation behavior #699

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Apr 20, 2025

Conversation

jjallaire
Copy link
Contributor

  • Don't preserve focus during render on save as this often ends up stealing focus from the terminal (which can lead to stray characters in documents).
  • Don't preserve focus after revealing preview window (we already tell vscode to preserveFocus -- this used to be inconsistently respected but now seems to work properly).

- Don't preserve focus during render on save as this often ends up stealing focus from the terminal (which can lead to stray characters in document)s.
- Don't preserve focus after revealing preview window (we already tell vscode to preserveFocus -- this used to be inconsistently respected but now seems to work properly)
@jjallaire jjallaire requested a review from juliasilge April 19, 2025 19:18
Copy link
Collaborator

@juliasilge juliasilge left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is working well for me! It's a little bit of a bummer to not have the focus switch back to the editor, but I also have experienced that problem with stray characters and I agree that it is much worse than having the user need to handle the focus themselves. Maybe we can revisit this in the future to get back some of that focus preservation.

I updated the changelog in 863233b so this is good to merge now. ✅

@jjallaire jjallaire merged commit e39602a into main Apr 20, 2025
1 check passed
@jjallaire jjallaire deleted the feature/editor-focus-preservation branch April 20, 2025 07:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants