This commit is contained in:
GH Action - Upstream Sync
2024-03-20 01:01:36 +00:00
2 changed files with 9 additions and 5 deletions

View File

@@ -219,6 +219,8 @@ function useSubmitHandler() {
}, []);
const shouldSubmit = (e: React.KeyboardEvent<HTMLTextAreaElement>) => {
// 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;