Skip to content

Commit

Permalink
fix send enter: support shift+enter line break in enter key mode
Browse files Browse the repository at this point in the history
  • Loading branch information
zmh-program committed Mar 11, 2024
1 parent 283118e commit e8d5c35
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions app/src/components/home/assemblies/ChatInput.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -42,9 +42,9 @@ function ChatInput({
if (e.key === "Enter") {
if (sender) {
// on Enter, clear the input
// on Ctrl + Enter, keep the input
// on Ctrl + Enter or Shift + Enter, keep the input

if (!e.ctrlKey) {
if (!e.ctrlKey && !e.shiftKey) {
e.preventDefault();
onEnterPressed();
} else {
Expand Down

0 comments on commit e8d5c35

Please sign in to comment.