-
Notifications
You must be signed in to change notification settings - Fork 2.8k
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
Ambiguous wording in form submission leads to interop issue #11092
Comments
Did you also test with a |
Yes I did in that case all browsers agree, the returnValue is overriden (which makes sense because close the dialog overrides when it's not null. |
@smaug---- @emilio how do you feel about aligning with Chromium & WebKit here? Perhaps we should not define this in terms of concept-ce-value at all then, but rather some value attribute getter. |
What would the change be in case one is using |
Ah, 11.4 talks about that already. |
It's a little inconsistent in that for ordinary form submission the Maybe we should separately define "command value" and use that where appropriate? |
The minimal change would be using the same language as in #11045 I guess we've got to decide if we want to do that or a larger change, the issue with defining a command value and using it in this spot is that submitter can be an input and inputs can't be command invokers, so it might be confusing. |
That's a good point, but having a content attribute check precede an abstract value concept check in a couple of places that will be hard to correlate is rather ungainly. Here's an improved idea: we define concept-fe-optional-value that returns the value attribute or null in its absence. Potentially we also assert the state of the type attribute so it doesn't get used too widely. |
What is the issue with the HTML Standard?
See step 11.5 of https://html.spec.whatwg.org/multipage/form-control-infrastructure.html#concept-form-submit
this as specced means that a submit button in a dialog form will always override the dialog's returnValue because a button always "has a value" (it's an empty string when missing the value attribute).
However, Chromium and WebKit implement this step as "has a value attribute" which is not the same thing.
I believe Chromium and WebKit implement this as would be expected and the spec should be updated to clarify (with tests added for this case).
Test Case: https://jsfiddle.net/wfhgc9yd/
The text was updated successfully, but these errors were encountered: