fix: resolve Enter event conflict during CJK IME (#253)

* fix: resolve Enter event conflict during CJK IME

* add

---------

Co-authored-by: Mckay Wrigley <mckaywrigley@gmail.com>
This commit is contained in:
Bryan Lee
2023-03-28 16:46:16 +08:00
committed by GitHub
parent 28c8bf0e0d
commit a73ef2b8cf
3 changed files with 8 additions and 5 deletions
+1 -1
View File
@@ -141,7 +141,7 @@ export const ChatInput: FC<Props> = ({
} else {
setActivePromptIndex(0);
}
} else if (e.key === 'Enter' && !isMobile() && !e.shiftKey) {
} else if (e.key === 'Enter' && !isTyping && !isMobile() && !e.shiftKey) {
e.preventDefault();
handleSend();
}