Skip to content

Commit 659d001

Browse files
authored
Merge pull request #84 from riya-amemiya/riya-amemiya/fix-keydown
fix(chat): prevent Enter key action during IME composition
2 parents 5be4cc1 + 55117ec commit 659d001

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

apps/postgres-new/components/chat.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -506,7 +506,7 @@ export default function Chat() {
506506
return
507507
}
508508

509-
if (e.key === 'Enter' && !e.shiftKey) {
509+
if (e.key === 'Enter' && !e.shiftKey && !e.nativeEvent.isComposing) {
510510
e.preventDefault()
511511
if (!isLoading && isSubmitEnabled) {
512512
handleFormSubmit(e)

0 commit comments

Comments
 (0)