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 0cc8367 commit 4a79eccCopy full SHA for 4a79ecc
src/combobox-nav.js
@@ -90,8 +90,8 @@ export function navigate(
90
list: HTMLElement,
91
indexDiff: -1 | 1 = 1
92
): void {
93
- const focusEl = list.querySelector('[aria-selected="true"]')
94
- const els = Array.from(list.querySelectorAll('[role="option"]'))
+ const focusEl = list.querySelector('[aria-selected="true"]:not([hidden])')
+ const els = Array.from(list.querySelectorAll('[role="option"]:not([hidden])'))
95
const focusIndex = els.indexOf(focusEl)
96
let indexOfItem = indexDiff === 1 ? 0 : els.length - 1
97
if (focusEl && focusIndex >= 0) {
0 commit comments