Skip to content
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

Don't focus editor when un-expanded comment is hidden #97101

Merged
merged 1 commit into from Oct 9, 2020

Conversation

evangrayk
Copy link
Contributor

This PR fixes #97100, where the terminal is defocused when comments are changed, which can be caused by terminal commands.

The problem was that when a comment was hidden, it would focus the editor, in order to not have the hidden inline reply editor still focused in the back. But if you hide a comment that is not already expanded, it will still focus the editor, which steals focus from whatever else you had focused.

We don't need to focus the editor if the comment is not expanded.

Tested this by making sure the terminal stays focused even if comments are updated/removed. Also made sure if you open a comment, then type in the reply box, then hide the comment by any means, it would focus the editor and not allow typing in the hidden reply box.

@rebornix rebornix added bug Issue identified by VS Code Team member as probable bug comments Comments Provider/Widget/Panel issues labels Oct 8, 2020
@rebornix rebornix added this to the October 2020 milestone Oct 8, 2020
@rebornix
Copy link
Member

rebornix commented Oct 9, 2020

Thank you for your help! Good work!

@rebornix rebornix merged commit e1a135d into microsoft:master Oct 9, 2020
@eamodio eamodio removed the bug Issue identified by VS Code Team member as probable bug label Oct 30, 2020
@github-actions github-actions bot locked and limited conversation to collaborators Dec 5, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
comments Comments Provider/Widget/Panel issues
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Updating comments force focuses editor
4 participants