Skip to content

Commit

Permalink
fix: use keyboard navigation in toolbar (#22792)
Browse files Browse the repository at this point in the history
  • Loading branch information
pauldambra authored Jun 7, 2024
1 parent d86e363 commit edcfbe3
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions frontend/src/lib/lemon-ui/LemonMenu/useKeyboardNavigation.ts
Original file line number Diff line number Diff line change
Expand Up @@ -42,12 +42,12 @@ export function useKeyboardNavigation<R extends HTMLElement = HTMLElement, I ext

referenceRef.current?.addEventListener('keydown', handleKeyDown)
for (const item of itemsRef.current) {
item.current?.addEventListener('keydown', handleKeyDown)
item?.current?.addEventListener('keydown', handleKeyDown)
}
return () => {
referenceRef.current?.removeEventListener('keydown', handleKeyDown)
for (const item of itemsRef.current) {
item.current?.removeEventListener('keydown', handleKeyDown)
item?.current?.removeEventListener('keydown', handleKeyDown)
}
}
}, [focusedItemIndex, itemCount])
Expand Down

0 comments on commit edcfbe3

Please sign in to comment.