microsoft / vscode

Visual Studio Code
https://code.visualstudio.com
MIT License
162.45k stars 28.63k forks source link

When "comment" text box is focused and "Review Pull Request" panel is in a sidebar, `sideBarFocus` does not get set to `true` #227229

Open macintacos opened 3 weeks ago

macintacos commented 3 weeks ago

I have my primary sidebar set to be on the right side. When the "comment" textbox supplied by this extension (screenshotted below) is focused, sideBarFocus is not set to true. I know this for a fact, because I have set up a keyboard shortcut with a when clause of just sideBarFocus, and it doesn't work when I'm in that text box - if I'm in another text box in the sidebar (for example, the extension view) and I use the same shortcut, it works fine.

CleanShot 2024-08-20 at 15 30 01

Steps to Reproduce:

  1. Create a keyboard shortcut with a when clause set to sideBarFocus. For demo purposes, I'm using the command to show the command palette (it could be anything):
{
  "key": "cmd+ctrl+space",
  "command": "workbench.action.showCommands",
  "when": "sideBarFocus"
}
  1. Go to the "Leave a comment" textbox and try invoking that shortcut. It does not do anything.
  2. Go to another panel, for example, the extensions view, click on a text box, and try to invoke the command. It works.

If this extension is in the sidebar, and my cursor is in the extension, then sideBarFocus should be true - but it's not. It's not clear to me whether or not this is a VSCode problem or a problem with this extension, however, considering that it works in other sidebar views, I want to place the blame on the extension at this point.

alexr00 commented 2 weeks ago

This appears to be an issue with webview views inthe side bar.