-
Notifications
You must be signed in to change notification settings - Fork 2.6k
Reapply "Always focus the panel when clicked to ensure menu buttons are visible" #4598
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
Reapply "Always focus the panel when clicked to ensure menu buttons are visible" #4598
Conversation
…re visible" (RooCodeInc#4592) This reverts commit 85fd86e.
Enhances the non-interactive click listener by adding support for 'VSCODE-TEXT-AREA' and 'VSCODE-TEXT-FIELD' tags. This ensures that typing in VSCode-specific input elements is not disrupted by unintentional triggers. Not including these element was causing users not to be able to edit some input boxes on the settings page. This fixes that!
| target.tagName !== "VSCODE-TEXT-AREA" && | ||
| target.tagName !== "VSCODE-TEXT-FIELD" && |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I was missing these before which caused the revert
| itemType, | ||
| itemName, | ||
| target, | ||
| ... (properties || {}), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This change is unrelated but the linter does it automatically
daniel-lxs
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hey @hassoncs, I made some changes to prevent some weird behavior I was seeing with the tab trying to focus again even when it already had the focus.
Also the sidebar doesn't need focus when clicking a non-interactive element since the icons in the toolbar are always visible.
I tested every input field I could find and seems to be working.
LGTM
…re visible" (RooCodeInc#4598) Co-authored-by: Daniel Riccio <[email protected]> Co-authored-by: Matt Rubens <[email protected]>
…re visible" (#4598) Co-authored-by: Daniel Riccio <[email protected]> Co-authored-by: Matt Rubens <[email protected]>
Re-apply the fix from #4592, this time with proper detection of all VSCode related input tags!
Test plan:
Important
Re-applies panel focus fix with improved input detection, adding a new command and utility for focusing panels, and updates webview to request focus on non-interactive clicks.
focusPanelRequestmessage handling inwebviewMessageHandler.tsto executefocusPanelcommand.useAddNonInteractiveClickListenerinApp.tsxto postfocusPanelRequestwhen non-interactive elements are clicked.focusPanelcommand inregisterCommands.tsto focus the active panel usingfocusPanel().focusPanel()infocusPanel.tsto focus either tab or sidebar panels.focusPaneltocommandIdsinvscode.ts.TelemetryService.ts.This description was created by
for 1e80a04. You can customize this summary. It will automatically update as commits are pushed.