From 9eb2de7af150eb9eff218eb887529256f497ec3a Mon Sep 17 00:00:00 2001 From: greymoth <246701683+greymoth-jp@users.noreply.github.com> Date: Tue, 30 Jun 2026 01:49:12 +0900 Subject: [PATCH] fix(Composer): skip send on Enter during IME composition The Composer Enter handler called send() on keyCode 13 without checking whether an IME composition was active. While composing CJK text (Japanese, Chinese, Korean), the Enter that confirms a conversion candidate also triggered send, so a half-composed message was submitted before the user finished typing. Guard the send with !e.nativeEvent.isComposing so Enter only sends once composition has ended. isComposing is on the native KeyboardEvent rather than the React synthetic event. --- src/components/Composer/index.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/components/Composer/index.tsx b/src/components/Composer/index.tsx index d6a6a5c..248b00d 100644 --- a/src/components/Composer/index.tsx +++ b/src/components/Composer/index.tsx @@ -248,7 +248,7 @@ export const Composer = React.forwardRef((props, const handleInputKeyDown = useCallback( (e: React.KeyboardEvent) => { - if (!e.shiftKey && e.keyCode === 13) { + if (!e.shiftKey && e.keyCode === 13 && !e.nativeEvent.isComposing) { send(); e.preventDefault(); }