From 451f8c07533fa6ea73f126d2032982f7c2029424 Mon Sep 17 00:00:00 2001 From: Xiro The Dev Date: Sun, 6 Sep 2026 18:40:03 +0700 Subject: [PATCH] fix(web-vue): Button rendered a
via reka Primitive, so clicks could not submit forms or receive disabled --- apps/web-vue/src/components/ui/button.vue | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/apps/web-vue/src/components/ui/button.vue b/apps/web-vue/src/components/ui/button.vue index 6b650a9..9ea3d57 100644 --- a/apps/web-vue/src/components/ui/button.vue +++ b/apps/web-vue/src/components/ui/button.vue @@ -44,6 +44,11 @@ export function Button(props: ButtonProps, { attrs, slots }: any): VNode { return h( Primitive, { + // Primitive defaults to
, which cannot submit forms or receive disabled. + // asChild=true swaps the element for the slot child; plain type="button" keeps + // in-form buttons from implicitly submitting. + as: 'button', + type: 'button', ...attrs, 'data-slot': 'button', 'data-variant': variant ?? 'default',