From 028957fcdcb0ec8860622237fc0923a67445c38a Mon Sep 17 00:00:00 2001 From: Raax Date: Sat, 16 Mar 2024 21:55:16 +0800 Subject: [PATCH] Fix "Enter" bug Fix Chinese input method "Enter" on Safari --- app/components/chat.tsx | 2 ++ 1 file changed, 2 insertions(+) diff --git a/app/components/chat.tsx b/app/components/chat.tsx index bcd0e605df2..b9750f2851d 100644 --- a/app/components/chat.tsx +++ b/app/components/chat.tsx @@ -219,6 +219,8 @@ function useSubmitHandler() { }, []); const shouldSubmit = (e: React.KeyboardEvent) => { + // Fix Chinese input method "Enter" on Safari + if (e.keyCode == 229) return false; if (e.key !== "Enter") return false; if (e.key === "Enter" && (e.nativeEvent.isComposing || isComposing.current)) return false;