Skip to content

Commit

Permalink
Merge pull request #4360 from tloncorp/po/tlon-3296-enter-should-send…
Browse files Browse the repository at this point in the history
…-edit

desktop: enter should submit edit
  • Loading branch information
patosullivan authored Jan 23, 2025
2 parents c61b647 + 8744ee8 commit 416d14e
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions packages/ui/src/components/BareChatInput/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -672,10 +672,14 @@ export default function BareChatInput({

if (keyEvent.key === 'Enter' && !keyEvent.shiftKey) {
e.preventDefault();
handleSend();
if (editingPost) {
handleEdit();
} else {
handleSend();
}
}
},
[setIsOpen, handleSend]
[setIsOpen, handleSend, handleEdit, editingPost]
);

return (
Expand Down

0 comments on commit 416d14e

Please sign in to comment.