Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Treat blank [formaction] like a blank [action] #529

Merged
merged 1 commit into from
Jun 2, 2022

Conversation

seanpdoyle
Copy link
Contributor

When handling form submissions, a <form> element that declares a
[action] to be the empty string (i.e. "") is treated as if it were
targeting the current path:

The action IDL attribute must reflect the content attribute of the
same name, except that on getting, when the content attribute is
missing or its value is the empty string, the element's node
document's URL must be returned instead.

§ 4.10.18.6 Form Submission attributes

Similarly, when handling form submissions with a submitter that declares
a [formaction] to be the empty string (i.e. "") is treated as if it
were targetting the current path.

The formAction IDL attribute must reflect the formaction content
attribute, except that on getting, when the content attribute is missing
or its value is the empty string, the element's node document's URL must
be returned instead.

§ 4.10.18.6 Form Submission attributes

@seanpdoyle seanpdoyle force-pushed the blank-formaction branch 4 times, most recently from 73e24bd to c1cfb11 Compare February 8, 2022 18:37
@seanpdoyle seanpdoyle force-pushed the blank-formaction branch 6 times, most recently from 79d58dd to 2f27ce9 Compare April 1, 2022 15:41
When handling form submissions, a `<form>` element that declares a
`[action]` to be the empty string (i.e. `""`) is treated as if it were
targeting the current path:

> The `action` IDL attribute must reflect the content attribute of the
> same name, except that on getting, when the content attribute is
> missing or its value is the empty string, the element's node
> document's URL must be returned instead.
>
> [§ 4.10.18.6 Form Submission attributes][action]

Similarly, when handling form submissions with a submitter that declares
a `[formaction]` to be the empty string (i.e. `""`) is treated as if it
were targetting the current path.

> The `formAction` IDL attribute must reflect the formaction content
> attribute, except that on getting, when the content attribute is missing
> or its value is the empty string, the element's node document's URL must
>be returned instead.
>
> [§ 4.10.18.6 Form Submission attributes][formaction]

[action]: https://html.spec.whatwg.org/multipage/form-control-infrastructure.html#dom-fs-action
[formaction]: https://html.spec.whatwg.org/multipage/form-control-infrastructure.html#dom-fs-formaction
@seanpdoyle
Copy link
Contributor Author

@dhh this is ready for review.

@dhh dhh merged commit 28b6e31 into hotwired:main Jun 2, 2022
@seanpdoyle seanpdoyle deleted the blank-formaction branch October 5, 2023 20:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

2 participants