Skip to content

Commit 060762a

Browse files
committed
fix: prevent chat suggestions from submitting forms
A form-associated <button> defaults to type="submit", not type="button". The suggestion tiles trigger a chat action, so declaring type="button" keeps them inert if this prompt area is ever wrapped by a form. Docs: https://developer.mozilla.org/en-US/docs/Web/HTML/Reference/Elements/button#type
1 parent 5a31b51 commit 060762a

1 file changed

Lines changed: 1 addition & 0 deletions

File tree

app/components/chat/ChatPanel.vue

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -126,6 +126,7 @@ const suggestions = [
126126
<button
127127
v-for="suggestion in suggestions"
128128
:key="suggestion.title"
129+
type="button"
129130
class="flex sm:flex-col gap-3 p-4 rounded-lg border border-default bg-default hover:bg-elevated/50 text-left transition-colors cursor-pointer"
130131
@click="askQuestion(suggestion.question)"
131132
>

0 commit comments

Comments
 (0)