We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 0c4c3f8 commit bcc4bcfCopy full SHA for bcc4bcf
packages/react/src/drafts/SelectPanel2/SelectPanel.tsx
@@ -165,7 +165,9 @@ const Panel: React.FC<SelectPanelProps> = ({
165
166
// used in SelectPanel.SearchInput
167
const moveFocusToList = () => {
168
- const firstListElement = dialogRef.current?.querySelector('ul[role=listbox] li') as HTMLLIElement | undefined
+ const selector = 'ul[role=listbox] li:not([role=none])'
169
+ // being specific about roles because there can be another ul (tabs in header) and an ActionList.Group (li[role=none])
170
+ const firstListElement = dialogRef.current?.querySelector(selector) as HTMLLIElement | undefined
171
firstListElement?.focus()
172
}
173
0 commit comments