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 40944ea commit bd444d3Copy full SHA for bd444d3
src/index.ts
@@ -147,9 +147,7 @@ function focusFirstItem(details: Element) {
147
}
148
149
function sibling(details: Element, next: boolean): HTMLElement | null {
150
- const options = Array.from(
151
- details.querySelectorAll<HTMLElement>('[role^="menuitem"]:not([hidden])')
152
- )
+ const options = Array.from(details.querySelectorAll<HTMLElement>('[role^="menuitem"]:not([hidden])'))
153
const selected = document.activeElement
154
const index = selected instanceof HTMLElement ? options.indexOf(selected) : -1
155
const found = next ? options[index + 1] : options[index - 1]
0 commit comments