Skip to content

Commit f274683

Browse files
authored
Merge pull request #4322 from imraax/dev
Fix "Enter" bug
2 parents e20ce8e + 028957f commit f274683

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

app/components/chat.tsx

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -219,6 +219,8 @@ function useSubmitHandler() {
219219
}, []);
220220

221221
const shouldSubmit = (e: React.KeyboardEvent<HTMLTextAreaElement>) => {
222+
// Fix Chinese input method "Enter" on Safari
223+
if (e.keyCode == 229) return false;
222224
if (e.key !== "Enter") return false;
223225
if (e.key === "Enter" && (e.nativeEvent.isComposing || isComposing.current))
224226
return false;

0 commit comments

Comments
 (0)