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

Is the initial submission value of a form-associated custom element really supposed to be null? #5263

Closed
pshaughn opened this issue Feb 8, 2020 · 3 comments
Assignees
Labels
compat Standard is not web compatible or proprietary feature needs standardizing topic: forms

Comments

@pshaughn
Copy link
Contributor

pshaughn commented Feb 8, 2020

WPT test custom-elements/form-associated/ElementInternals-setFormValue.html "Null value should submit nothing" contrasts two controls: one for which setFormValue has explicitly been called on its ElementInternals with an argument of null, and one for which internals are attached but setFormValue has never been called.

It expects the form to submit a query string that excludes the explicitly nulled element entirely, but includes the unset one as though it has an empty-string value. If the initial submission value is really null, as https://html.spec.whatwg.org/multipage/custom-elements.html#face-submission-value says, then the two elements should have the same behavior as each other.

Chrome/Edge pass the test, meaning their initial submission value behavior differs from spec; as Firefox and Safari aren't implementing it at all yet, this seems to raise a question as to whether the spec is saying the right thing.

Here's a link to the test case; the value setter on the custom element class is what calls setFormValue, and the constructor of the custom element attaches internals but does not call setFormValue.
https://github.com/web-platform-tests/wpt/blob/4f09d6508beb51df94feeb09c431549fdb26a201/custom-elements/form-associated/ElementInternals-setFormValue.html#L84-L95

@annevk
Copy link
Member

annevk commented Feb 11, 2020

cc @whatwg/forms

@annevk annevk added the compat Standard is not web compatible or proprietary feature needs standardizing label Feb 11, 2020
@tkent-google
Copy link
Collaborator

I think it's an implementation bug of Chrome, and a test bug. I filed crbug.com/1051292.
Probably I changed my mind about the initial value when I wrote the specification, and forgot to change the implementation and the test.

chromium-wpt-export-bot pushed a commit to web-platform-tests/wpt that referenced this issue Feb 12, 2020
… value'

According to https://html.spec.whatwg.org/C/#face-submission-value, the
initial value should be null, not an empty string.

Bug: 1051292
Bug: whatwg/html#5263
Change-Id: Ifa92aaca47bfce1e51aa0fd3dc9ebb9ab9b15d91
chromium-wpt-export-bot pushed a commit to web-platform-tests/wpt that referenced this issue Feb 14, 2020
… value'

According to https://html.spec.whatwg.org/C/#face-submission-value, the
initial value should be null, not an empty string.

Bug: 1051292
Bug: whatwg/html#5263
Change-Id: Ifa92aaca47bfce1e51aa0fd3dc9ebb9ab9b15d91
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2050148
Reviewed-by: Mason Freed <masonfreed@chromium.org>
Commit-Queue: Kent Tamura <tkent@chromium.org>
Cr-Commit-Position: refs/heads/master@{#741277}
chromium-wpt-export-bot pushed a commit to web-platform-tests/wpt that referenced this issue Feb 14, 2020
… value'

According to https://html.spec.whatwg.org/C/#face-submission-value, the
initial value should be null, not an empty string.

Bug: 1051292
Bug: whatwg/html#5263
Change-Id: Ifa92aaca47bfce1e51aa0fd3dc9ebb9ab9b15d91
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2050148
Reviewed-by: Mason Freed <masonfreed@chromium.org>
Commit-Queue: Kent Tamura <tkent@chromium.org>
Cr-Commit-Position: refs/heads/master@{#741277}
@tkent-google
Copy link
Collaborator

Fixed by web-platform-tests/wpt#21747

pull bot pushed a commit to FreddyZeng/chromium that referenced this issue Feb 14, 2020
… value'

According to https://html.spec.whatwg.org/C/#face-submission-value, the
initial value should be null, not an empty string.

Bug: 1051292
Bug: whatwg/html#5263
Change-Id: Ifa92aaca47bfce1e51aa0fd3dc9ebb9ab9b15d91
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2050148
Reviewed-by: Mason Freed <masonfreed@chromium.org>
Commit-Queue: Kent Tamura <tkent@chromium.org>
Cr-Commit-Position: refs/heads/master@{#741277}
xeonchen pushed a commit to xeonchen/gecko that referenced this issue Feb 19, 2020
… initial value of 'submission value', a=testonly

Automatic update from web-platform-tests
Form-associated custom elements: Fix the initial value of 'submission value'

According to https://html.spec.whatwg.org/C/#face-submission-value, the
initial value should be null, not an empty string.

Bug: 1051292
Bug: whatwg/html#5263
Change-Id: Ifa92aaca47bfce1e51aa0fd3dc9ebb9ab9b15d91
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2050148
Reviewed-by: Mason Freed <masonfreed@chromium.org>
Commit-Queue: Kent Tamura <tkent@chromium.org>
Cr-Commit-Position: refs/heads/master@{#741277}

--

wpt-commits: 69e5b86d38fe2d202bf439864375b5c775185165
wpt-pr: 21747
moz-v2v-gh pushed a commit to mozilla/gecko-dev that referenced this issue Feb 19, 2020
… initial value of 'submission value', a=testonly

Automatic update from web-platform-tests
Form-associated custom elements: Fix the initial value of 'submission value'

According to https://html.spec.whatwg.org/C/#face-submission-value, the
initial value should be null, not an empty string.

Bug: 1051292
Bug: whatwg/html#5263
Change-Id: Ifa92aaca47bfce1e51aa0fd3dc9ebb9ab9b15d91
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2050148
Reviewed-by: Mason Freed <masonfreed@chromium.org>
Commit-Queue: Kent Tamura <tkent@chromium.org>
Cr-Commit-Position: refs/heads/master@{#741277}

--

wpt-commits: 69e5b86d38fe2d202bf439864375b5c775185165
wpt-pr: 21747
gecko-dev-updater pushed a commit to marco-c/gecko-dev-wordified-and-comments-removed that referenced this issue Feb 19, 2020
… initial value of 'submission value', a=testonly

Automatic update from web-platform-tests
Form-associated custom elements: Fix the initial value of 'submission value'

According to https://html.spec.whatwg.org/C/#face-submission-value, the
initial value should be null, not an empty string.

Bug: 1051292
Bug: whatwg/html#5263
Change-Id: Ifa92aaca47bfce1e51aa0fd3dc9ebb9ab9b15d91
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2050148
Reviewed-by: Mason Freed <masonfreedchromium.org>
Commit-Queue: Kent Tamura <tkentchromium.org>
Cr-Commit-Position: refs/heads/master{#741277}

--

wpt-commits: 69e5b86d38fe2d202bf439864375b5c775185165
wpt-pr: 21747

UltraBlame original commit: c037e9d70b354ec805cd943bfb17f2cccd560da0
gecko-dev-updater pushed a commit to marco-c/gecko-dev-wordified that referenced this issue Feb 19, 2020
… initial value of 'submission value', a=testonly

Automatic update from web-platform-tests
Form-associated custom elements: Fix the initial value of 'submission value'

According to https://html.spec.whatwg.org/C/#face-submission-value, the
initial value should be null, not an empty string.

Bug: 1051292
Bug: whatwg/html#5263
Change-Id: Ifa92aaca47bfce1e51aa0fd3dc9ebb9ab9b15d91
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2050148
Reviewed-by: Mason Freed <masonfreedchromium.org>
Commit-Queue: Kent Tamura <tkentchromium.org>
Cr-Commit-Position: refs/heads/master{#741277}

--

wpt-commits: 69e5b86d38fe2d202bf439864375b5c775185165
wpt-pr: 21747

UltraBlame original commit: c037e9d70b354ec805cd943bfb17f2cccd560da0
gecko-dev-updater pushed a commit to marco-c/gecko-dev-comments-removed that referenced this issue Feb 19, 2020
… initial value of 'submission value', a=testonly

Automatic update from web-platform-tests
Form-associated custom elements: Fix the initial value of 'submission value'

According to https://html.spec.whatwg.org/C/#face-submission-value, the
initial value should be null, not an empty string.

Bug: 1051292
Bug: whatwg/html#5263
Change-Id: Ifa92aaca47bfce1e51aa0fd3dc9ebb9ab9b15d91
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2050148
Reviewed-by: Mason Freed <masonfreedchromium.org>
Commit-Queue: Kent Tamura <tkentchromium.org>
Cr-Commit-Position: refs/heads/master{#741277}

--

wpt-commits: 69e5b86d38fe2d202bf439864375b5c775185165
wpt-pr: 21747

UltraBlame original commit: c037e9d70b354ec805cd943bfb17f2cccd560da0
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
compat Standard is not web compatible or proprietary feature needs standardizing topic: forms
Development

No branches or pull requests

3 participants