-
Notifications
You must be signed in to change notification settings - Fork 988
Closed
Labels
Description
Environment
- Operating System:
Windows_NT - Node Version:
v22.18.0 - Nuxt Version:
4.1.1 - CLI Version:
3.28.0 - Nitro Version:
2.12.4 - Package Manager:
[email protected] - Builder:
- - User Config:
runtimeConfig,modules,devtools,supabase,css,routeRules,compatibilityDate - Runtime Modules:
@nuxt/[email protected],@vueuse/[email protected],@nuxtjs/[email protected],[email protected] - Build Modules:
-
Is this bug related to Nuxt or Vue?
Nuxt
Package
v3.x
Version
v3.3.3
Reproduction
Description
The problem occurs because the UFileUpload component likely contains a button element that doesn't have an explicit type attribute, causing it to default to type="submit", which triggers form submission.
Additional context
<component
:is="variant === 'button' ? 'button' : 'div'"
ref="dropzoneRef"
:type="variant === 'button' ? 'button' : undefined" // 👈 add this maybe?
:role="variant === 'button' ? undefined : 'button'"
:data-dragging="isDragging"
:class="ui.base({ class: props.ui?.base })"
:tabindex="interactive && !disabled ? 0 : -1"
@click="interactive && !disabled && open()"
@keydown.prevent
@keyup.enter.space="interactive && !disabled && open()"
>