Skip to content

Commit 68f1297

Browse files
zerone0xclaude
andcommitted
fix(ui): allow text editing shortcuts in search dialogs on macOS
Skip list navigation when modifier keys (Alt/Option or Meta/Cmd) are pressed, allowing native text editing shortcuts like Option+Arrow (word navigation) and Option+Backspace (delete word) to work in search dialogs. Fixes #7398 Co-Authored-By: Claude Opus 4.5 <[email protected]>
1 parent bded900 commit 68f1297

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

packages/ui/src/hooks/use-filtered-list.tsx

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -82,6 +82,8 @@ export function useFilteredList<T>(props: FilteredListProps<T>) {
8282
const selected = flat()[selectedIndex]
8383
if (selected) props.onSelect?.(selected, selectedIndex)
8484
} else {
85+
// Skip list navigation for text editing shortcuts (e.g., Option+Arrow, Option+Backspace on macOS)
86+
if (event.altKey || event.metaKey) return
8587
list.onKeyDown(event)
8688
}
8789
}

0 commit comments

Comments
 (0)