Emoji Tooltip: Fix false triggers on key combination (#2871)

This commit is contained in:
Alexander Zinchuk 2023-03-30 18:25:34 -05:00
parent 458f03538a
commit ceef2fb4db

View File

@ -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) {