aboutsummaryrefslogtreecommitdiff
path: root/apps/web/src/components/Main.tsx
diff options
context:
space:
mode:
Diffstat (limited to 'apps/web/src/components/Main.tsx')
-rw-r--r--apps/web/src/components/Main.tsx3
1 files changed, 3 insertions, 0 deletions
diff --git a/apps/web/src/components/Main.tsx b/apps/web/src/components/Main.tsx
index 64650efd..74af7f5b 100644
--- a/apps/web/src/components/Main.tsx
+++ b/apps/web/src/components/Main.tsx
@@ -345,6 +345,7 @@ export default function Main({ sidebarOpen }: { sidebarOpen: boolean }) {
onChange: onValueChange,
onKeyDown: (e) => {
if (e.key === "Enter") {
+ e.preventDefault();
onSend();
}
},
@@ -389,6 +390,7 @@ export default function Main({ sidebarOpen }: { sidebarOpen: boolean }) {
onChange: (e) => setValue(e.target.value),
onKeyDown: (e) => {
if (e.key === "Enter" && !e.shiftKey) {
+ e.preventDefault();
onSend();
}
},
@@ -508,6 +510,7 @@ export function Chat({
onChange: onValueChange,
onKeyDown: (e) => {
if (e.key === "Enter" && !e.shiftKey) {
+ e.preventDefault();
askQuestion();
}
},