Fix unintended input submission during IME composition (#1552)
Prevent input submission on Enter key press during IME composition
This commit is contained in:
parent
0b380afb66
commit
402e706f27
1 changed files with 1 additions and 1 deletions
|
|
@ -29,7 +29,7 @@ export default function ChatInput({
|
|||
<div className="relative">
|
||||
<Textarea
|
||||
onKeyDown={(event) => {
|
||||
if (event.key === "Enter" && !lockChat && !event.shiftKey) {
|
||||
if (event.key === "Enter" && !event.nativeEvent.isComposing && !lockChat && !event.shiftKey) {
|
||||
sendMessage();
|
||||
}
|
||||
}}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue