microsoft / vscode

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

Switching between panes after changing clipboard with globalFindClipboard=true causes search field to be focused erroneously #228767

Open briankendall opened 1 month ago

briankendall commented 1 month ago

Does this issue occur when all extensions are disabled?: Yes

This bug drives me crazy when switching between panes, because the keyboard focus will shift to the wrong part of the UI and cause my typing to show up in the find panel rather than the actual file I'm trying to edit.

Steps to Reproduce:

  1. Set user preference editor.find.globalFindClipboard to true
  2. Open a new window
  3. Pick the menu View > Editor Layout > Two Columns
  4. With the left column focused, type in some text, any text. (It doesn't matter what it is.)
  5. Pick the menu Edit > Find to open the find panel.
  6. Type 'foo' into the find panel
  7. Select the text you typed in the leftmost column so that the find panel does not have keyboard focus
  8. Switch focus to the rightmost column
  9. Pick the menu File > New Text File
  10. Pick the menu Edit > Find to open the find panel in the rightmost pane
  11. Type 'bar' into it
  12. Click inside the leftmost column to attempt to move keyboard focus to it
  13. Note that the focus actually erroneously moves to the find pane, not the text editor!
aiday-mar commented 1 month ago

Not sure who to assign this to. @sandy081 I think you are responsible for the editor panes?