diff options
| author | drunkpiano <[email protected]> | 2026-01-21 03:01:56 +0800 |
|---|---|---|
| committer | GitHub <[email protected]> | 2026-01-20 13:01:56 -0600 |
| commit | 156ce54362f1ef18bd40c408e235f47193f92d1e (patch) | |
| tree | 8f7d4e09eef7868c64637675a708c3de3a2fa428 /packages/ui/src/hooks | |
| parent | 1bc919dc74771e7a839a5d44ddd6d6afde4f190e (diff) | |
| download | opencode-156ce54362f1ef18bd40c408e235f47193f92d1e.tar.gz opencode-156ce54362f1ef18bd40c408e235f47193f92d1e.zip | |
fix(ui): prevent Enter key action during IME composition (#9564)
Diffstat (limited to 'packages/ui/src/hooks')
| -rw-r--r-- | packages/ui/src/hooks/use-filtered-list.tsx | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/packages/ui/src/hooks/use-filtered-list.tsx b/packages/ui/src/hooks/use-filtered-list.tsx index b8a55000e..8595af529 100644 --- a/packages/ui/src/hooks/use-filtered-list.tsx +++ b/packages/ui/src/hooks/use-filtered-list.tsx @@ -77,7 +77,7 @@ export function useFilteredList<T>(props: FilteredListProps<T>) { } const onKeyDown = (event: KeyboardEvent) => { - if (event.key === "Enter") { + if (event.key === "Enter" && !event.isComposing) { event.preventDefault() const selectedIndex = flat().findIndex((x) => props.key(x) === list.active()) const selected = flat()[selectedIndex] |
