chore: fix menu navigation when focus is in input
This commit is contained in:
@@ -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 {
|
||||
|
||||
Reference in New Issue
Block a user