Skip to content

Commit

Permalink
fix: allow Shift+Enter to create new lines in the edit prompt textarea
Browse files Browse the repository at this point in the history
  • Loading branch information
vid277 authored and skeptrunedev committed Jul 8, 2024
1 parent 9ca9434 commit 5f33be3
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion frontends/chat/src/components/Atoms/AfMessage.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -214,7 +214,7 @@ export const AfMessage = (props: AfMessageProps) => {
if (e.key === "Escape") {
setEditing(false);
}
if (e.key === "Enter") {
if (e.key === "Enter" && !e.shiftKey) {
e.preventDefault();
props.onEdit(editingMessageContent());
setEditedContent(editingMessageContent());
Expand Down

0 comments on commit 5f33be3

Please sign in to comment.