From 9251714e4aae50f91d4e5082f2f7151a71321c30 Mon Sep 17 00:00:00 2001 From: Bluepuper <79052139+Bluepuper@users.noreply.github.com> Date: Thu, 14 Mar 2024 19:45:54 +0300 Subject: [PATCH] fix(DropdownMenu): fix opening from keyboard (#1404) --- src/hooks/useActionHandlers/useActionHandlers.ts | 1 + 1 file changed, 1 insertion(+) diff --git a/src/hooks/useActionHandlers/useActionHandlers.ts b/src/hooks/useActionHandlers/useActionHandlers.ts index 2f3884caf4..66597251aa 100644 --- a/src/hooks/useActionHandlers/useActionHandlers.ts +++ b/src/hooks/useActionHandlers/useActionHandlers.ts @@ -16,6 +16,7 @@ export function createOnKeyDownHandler(callback?: AnyFunction) { callback && [KeyCode.ENTER, KeyCode.SPACEBAR, KeyCode.SPACEBAR_OLD].includes(event.key) ) { + event.preventDefault(); callback(event); } };