diff --git a/src/core/drive/form_submission.ts b/src/core/drive/form_submission.ts index e7f884644..088f08e3b 100644 --- a/src/core/drive/form_submission.ts +++ b/src/core/drive/form_submission.ts @@ -74,7 +74,12 @@ export class FormSubmission { get action(): string { const formElementAction = typeof this.formElement.action === 'string' ? this.formElement.action : null - return this.submitter?.getAttribute("formaction") || this.formElement.getAttribute("action") || formElementAction || "" + + if (this.submitter?.hasAttribute("formaction")) { + return this.submitter.getAttribute("formaction") || "" + } else { + return this.formElement.getAttribute("action") || formElementAction || "" + } } get body() { diff --git a/src/tests/fixtures/form.html b/src/tests/fixtures/form.html index e4c48088d..0e7d2a77f 100644 --- a/src/tests/fixtures/form.html +++ b/src/tests/fixtures/form.html @@ -93,6 +93,11 @@