Skip to content

Commit

Permalink
Merge pull request #679 from Dlouxgit/main
Browse files Browse the repository at this point in the history
fix: handle conflicts between input method engine and enter key in chatbox
  • Loading branch information
thecodacus authored Dec 14, 2024
2 parents a71cfba + 3db4004 commit 4f02887
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions app/components/chat/BaseChat.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -425,12 +425,15 @@ export const BaseChat = React.forwardRef<HTMLDivElement, BaseChatProps>(
}

event.preventDefault();

if (isStreaming) {
handleStop?.();
return;
}

// ignore if using input method engine
if (event.nativeEvent.isComposing) {
return
}
handleSendMessage?.(event);
}
}}
Expand Down

0 comments on commit 4f02887

Please sign in to comment.