Severity: high · Category: implementation bug
Evidence. packages/adapter-vite/src/internal/ssg/entry-generators.ts (in __onSubmit): var actionUrl = (submitter && submitter.formAction) || form.action || window.location.href;. The formAction IDL attribute returns the DOCUMENT URL when the submitter has no formaction attribute, so it always wins over form.action.
Repro (verified in browser). Page at /live?x=1 with <form action="/other" method="post" data-open-enhance> and a plain submit button: submitter.formAction === http://host/live?x=1, so the enhanced POST goes to /live?x=1, while the native POST (no JS) correctly goes to /other — the two channels disagree (ADR-0120 rule 2).
Fix. Only honor formAction when the attribute is present: (submitter && submitter.hasAttribute('formaction') && submitter.formAction) || form.action || window.location.href.
Acceptance. e2e: enhanced submit of <form action="/other-route"> with an attribute-less submitter POSTs to /other-route; the formaction case keeps working.
Filed from the 0.42 round-2 review (docs/audit/2026-07-28-alpha5-round2-review.md). Target line: 0.42.0-alpha.6.
Severity: high · Category: implementation bug
Evidence.
packages/adapter-vite/src/internal/ssg/entry-generators.ts(in__onSubmit):var actionUrl = (submitter && submitter.formAction) || form.action || window.location.href;. TheformActionIDL attribute returns the DOCUMENT URL when the submitter has noformactionattribute, so it always wins overform.action.Repro (verified in browser). Page at
/live?x=1with<form action="/other" method="post" data-open-enhance>and a plain submit button:submitter.formAction===http://host/live?x=1, so the enhanced POST goes to/live?x=1, while the native POST (no JS) correctly goes to/other— the two channels disagree (ADR-0120 rule 2).Fix. Only honor
formActionwhen the attribute is present:(submitter && submitter.hasAttribute('formaction') && submitter.formAction) || form.action || window.location.href.Acceptance. e2e: enhanced submit of
<form action="/other-route">with an attribute-less submitter POSTs to/other-route; the formaction case keeps working.Filed from the 0.42 round-2 review (docs/audit/2026-07-28-alpha5-round2-review.md). Target line: 0.42.0-alpha.6.