Skip to content

Commit

Permalink
Merge pull request #84 from riya-amemiya/riya-amemiya/fix-keydown
Browse files Browse the repository at this point in the history
fix(chat): prevent Enter key action during IME composition
  • Loading branch information
gregnr committed Sep 20, 2024
2 parents 5be4cc1 + 55117ec commit 659d001
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion apps/postgres-new/components/chat.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -506,7 +506,7 @@ export default function Chat() {
return
}

if (e.key === 'Enter' && !e.shiftKey) {
if (e.key === 'Enter' && !e.shiftKey && !e.nativeEvent.isComposing) {
e.preventDefault()
if (!isLoading && isSubmitEnabled) {
handleFormSubmit(e)
Expand Down

0 comments on commit 659d001

Please sign in to comment.