From b0ca49d65ea770065e66508d9bafcec7ab21ddad Mon Sep 17 00:00:00 2001 From: Dlouxgit <470490778@qq.com> Date: Fri, 13 Dec 2024 12:16:57 +0800 Subject: [PATCH] fix: handle conflicts between input method engine and enter key --- app/components/chat/BaseChat.tsx | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/app/components/chat/BaseChat.tsx b/app/components/chat/BaseChat.tsx index a77932c7..3b5c9ad5 100644 --- a/app/components/chat/BaseChat.tsx +++ b/app/components/chat/BaseChat.tsx @@ -431,7 +431,9 @@ export const BaseChat = React.forwardRef( return; } - handleSendMessage?.(event); + if (!event.nativeEvent.isComposing) { + handleSendMessage?.(event); + } } }} value={input}