Skip to content

The fastest, cheapest, most efficient open-source agent harness. Run more than 500 agents on a $10 VPS.

fix(composer): block Enter during composition even when keydown lacks isComposing flag\n\nThe Lexical composer's onKeyDownCapture only checked native.isComposing and\nkeyCode 229, but some IMEs (e.g. Korean) fire keydown without those flags after\na compositionstart event. The isComposingTextRef tracks composition state\nreliably from compositionstart; add it to the guard so Enter during any active\nIME composition is blocked regardless of whether the keydown carries the flag.\n

shanuace4a8541a0c
diff --git a/app/src/components/assistant-ui/thread.tsx b/app/src/components/assistant-ui/thread.tsx
index a5f44f7931..5ad1456722 100644
--- a/app/src/components/assistant-ui/thread.tsx
+++ b/app/src/components/assistant-ui/thread.tsx
@@ -496,6 +496,7 @@ const Composer: FC<{
}
const native = event.nativeEvent;
if (
+ isComposingTextRef.current ||
native.isComposing ||
native.keyCode === 229 ||
('which' in native && native.which === 229)