Emoji Tooltip: Fix false triggers on key combination (#2871)
This commit is contained in:
parent
458f03538a
commit
ceef2fb4db
@ -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) {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user