From ceef2fb4dbc2bc9f4c9f5e0e9bb0ed587b5acea3 Mon Sep 17 00:00:00 2001 From: Alexander Zinchuk Date: Thu, 30 Mar 2023 18:25:34 -0500 Subject: [PATCH] Emoji Tooltip: Fix false triggers on key combination (#2871) --- src/components/middle/composer/hooks/useKeyboardNavigation.ts | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/components/middle/composer/hooks/useKeyboardNavigation.ts b/src/components/middle/composer/hooks/useKeyboardNavigation.ts index 4d5a8845a..aac9db9d4 100644 --- a/src/components/middle/composer/hooks/useKeyboardNavigation.ts +++ b/src/components/middle/composer/hooks/useKeyboardNavigation.ts @@ -39,6 +39,8 @@ export function useKeyboardNavigation({ }, [setSelectedItemIndex, getSelectedIndex]); const handleItemSelect = useCallback((e: KeyboardEvent) => { + // Prevent action on key combinations + if (e.altKey || e.ctrlKey || e.metaKey || e.shiftKey) return false; if (items && items.length && selectedItemIndex > -1) { const item = items[selectedItemIndex]; if (item) {