Skip to content

Updating comments force focuses editor #97100

@evangrayk

Description

@evangrayk
  • VSCode Version: 1.44.2
  • OS Version: macOS

Steps to Reproduce:

  1. Have an extension providing in-editor comments via the comments API
  2. Open an editor containing comments
  3. Focus the terminal at the bottom
  4. Run a command which causes the comments to be updated. For our comment provider, we automatically detect comments associated with your source control commit. So, for example, use the command line to checkout a different commit.
  5. The comments will change, causing some of the previous comments to be hidden. When this happens, the editor is focused. This causes you to lose focus on the terminal.

The end result UX is that you're typing commands in the terminal, and your focus gets stolen to an open editor for no visible reason, making it annoying if you wanted to keep running more commands.

Notably, this depends on the way the comments API is used. I believe many comment providers do not respond to source control, and require clicking a button to activate/deactivate, so it's likely that's why this hasn't been reported before. For us, this is really annoying, and I could see this hitting other providers in the future.

Does this issue occur when all extensions are disabled?: No, because you need an extension which contributes via comments API

Metadata

Metadata

Labels

bugIssue identified by VS Code Team member as probable bugcommentsComments Provider/Widget/Panel issuesinsiders-releasedPatch has been released in VS Code InsidersverifiedVerification succeeded

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions