Skip to content

Commit 4f02887

Browse files
authored
Merge pull request #679 from Dlouxgit/main
fix: handle conflicts between input method engine and enter key in chatbox
2 parents a71cfba + 3db4004 commit 4f02887

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

app/components/chat/BaseChat.tsx

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -425,12 +425,15 @@ export const BaseChat = React.forwardRef<HTMLDivElement, BaseChatProps>(
425425
}
426426

427427
event.preventDefault();
428-
428+
429429
if (isStreaming) {
430430
handleStop?.();
431431
return;
432432
}
433-
433+
// ignore if using input method engine
434+
if (event.nativeEvent.isComposing) {
435+
return
436+
}
434437
handleSendMessage?.(event);
435438
}
436439
}}

0 commit comments

Comments
 (0)