fix: ignore IME composition to avoid accidental selection (#2100)

This commit is contained in:
ShikChen
2025-07-20 23:35:50 +08:00
committed by GitHub
parent a1f5ca12ed
commit 5913cc41fc
2 changed files with 6 additions and 1 deletions
+5
View File
@@ -0,0 +1,5 @@
---
'fumadocs-ui': patch
---
Ignore IME composition to avoid accidental selection
+1 -1
View File
@@ -227,7 +227,7 @@ export function SearchDialogList({
};
const onKey = useEffectEvent((e: KeyboardEvent) => {
if (!items) return;
if (!items || e.isComposing) return;
if (e.key === 'ArrowDown' || e.key == 'ArrowUp') {
let idx = items.findIndex((item) => item.id === active);