Skip to content

Commit

Permalink
Change "Enter" submit logic
Browse files Browse the repository at this point in the history
  • Loading branch information
Pelps12 committed Apr 18, 2024
1 parent 51d6c6c commit f7b1341
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions apps/web/src/components/Main.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -388,7 +388,7 @@ export default function Main({ sidebarOpen }: { sidebarOpen: boolean }) {
autoFocus: true,
onChange: (e) => setValue(e.target.value),
onKeyDown: (e) => {
if (e.key === "Enter" && (e.ctrlKey || e.metaKey)) {
if (e.key === "Enter" && !e.shiftKey) {
onSend();
}
},
Expand Down Expand Up @@ -507,7 +507,7 @@ export function Chat({
autoFocus: true,
onChange: onValueChange,
onKeyDown: (e) => {
if (e.key === "Enter" && (e.ctrlKey || e.metaKey)) {
if (e.key === "Enter" && !e.shiftKey) {
askQuestion();
}
},
Expand Down

0 comments on commit f7b1341

Please sign in to comment.