Skip to content

fix(web-vue): Button rendered a <div> — clicks could not submit forms - #60

Merged
xirothedev merged 1 commit into
mainfrom
fix/web-vue-button-element
Sep 6, 2026
Merged

fix(web-vue): Button rendered a <div> — clicks could not submit forms#60
xirothedev merged 1 commit into
mainfrom
fix/web-vue-button-element

Conversation

@xirothedev

Copy link
Copy Markdown
Owner

Headless-Chrome e2e against the local api found this: ui/button.vue rendered reka-ui Primitive with no as, so every <Button> was a <div type="submit"> — a div cannot submit a form, cannot be disabled, and swallows the click. Login by button-click could never work in web-vue; Enter-to-submit was also dead because HTML implicit submission needs a real submit button.

Fix: Primitive defaults to as="button" + type="button"; asChild still swaps in the slot child; caller type="submit" attrs override.

Verified: e2e login through the real form (requestSubmit -> 200 -> redirect -> /account/profile -> avatar upload -> PATCH 200 -> object in LocalStack S3, public GET 200).

Related localhost gotcha found while testing (not fixed here): with no registrable domain, Chrome treats localhost:3005 -> localhost:4100 as cross-SITE, so the login Set-Cookie (SameSite=Lax) is dropped by the browser even though the server sends it correctly. The auth-cookies "lax for multiple ports" comment is only true for real domains. Local dev workaround: vite server.proxy /v1 -> :4100 and VITE_API_URL=/v1 (same-origin). Happy to add that as a follow-up.

@xirothedev
xirothedev merged commit c2f6c93 into main Sep 6, 2026
@xirothedev
xirothedev deleted the fix/web-vue-button-element branch September 6, 2026 11:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant