From cec3784536dcaf8343074bdbb01eaa164818f556 Mon Sep 17 00:00:00 2001 From: Shusaku Uesugi Date: Wed, 5 Mar 2025 12:46:07 -0800 Subject: [PATCH] Check for isComposing --- components/multimodal-input.tsx | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/components/multimodal-input.tsx b/components/multimodal-input.tsx index 07cceea..2e5475b 100644 --- a/components/multimodal-input.tsx +++ b/components/multimodal-input.tsx @@ -246,7 +246,11 @@ function PureMultimodalInput({ rows={2} autoFocus onKeyDown={(event) => { - if (event.key === 'Enter' && !event.shiftKey) { + if ( + event.key === "Enter" && + !event.shiftKey && + !event.nativeEvent.isComposing + ) { event.preventDefault(); if (isLoading) {