chore: fix menu navigation when focus is in input

This commit is contained in:
Aman Harwara
2023-04-24 16:28:41 +05:30
parent 353a76c1ab
commit 5fb04e38a1

View File

@@ -56,6 +56,12 @@ export const useListKeyboardNavigation = (
const keyDownHandler = useCallback(
(e: KeyboardEvent) => {
const isFocusInInput = document.activeElement?.tagName === 'INPUT'
if (isFocusInInput) {
return
}
if (e.key === KeyboardKey.Up || e.key === KeyboardKey.Down) {
e.preventDefault()
} else {