-
Notifications
You must be signed in to change notification settings - Fork 29.2k
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
Fix tabbing in trees #32502
Fix tabbing in trees #32502
Conversation
@@ -444,7 +444,7 @@ export class TreeView extends HeightMap { | |||
|
|||
this.domNode = document.createElement('div'); | |||
this.domNode.className = `monaco-tree no-focused-item monaco-tree-instance-${this.instance}`; | |||
this.domNode.tabIndex = 0; | |||
this.domNode.tabIndex = context.options.preventRootFocus ? -1 : 0; |
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.
Is preventRootFocus still a good name for the option? And were you able to figure out why we need the tabIndex for quick navigate?
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.
Thanks, seems to work nicely 👍
@@ -335,7 +336,15 @@ export class QuickOpenWidget implements IModelProvider { | |||
} | |||
|
|||
this.applyStyles(); | |||
|
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.
@Lixire I prefer to keep the newline here, looks logically too close otherwise imho:
PR 2: Electric Boogaloo
I changed the tab index to -1 instead of not setting it at all so it can still be focusable which fixes the quick navigate feature.
Fixes #31835 and #31836