| Summary: | ElementInternals.setFormValue(<nullish value>) doesn't clear submission value | ||||||
|---|---|---|---|---|---|---|---|
| Product: | WebKit | Reporter: | fayti1703 | ||||
| Component: | DOM | Assignee: | Alexey Shvayka <ashvayka> | ||||
| Status: | RESOLVED FIXED | ||||||
| Severity: | Normal | CC: | akeerthi, ashvayka, rniwa, webkit-bug-importer | ||||
| Priority: | P2 | Keywords: | InRadar | ||||
| Version: | WebKit Nightly Build | ||||||
| Hardware: | All | ||||||
| OS: | All | ||||||
| See Also: | https://github.com/web-platform-tests/wpt/pull/41090 | ||||||
| Bug Depends on: | |||||||
| Bug Blocks: | 154907 | ||||||
| Attachments: |
|
||||||
(In reply to fayti1703 from comment #0) > Created attachment 466930 [details] > Testcase > > Trying to remove a form-associated custom element's value via > `.internals.setFormValue(null)` fails silently -- the old value appears > during form submission and `FormData` construction on the parent form. > > I've attached a test-case to demonstrate the issue. (Firefox 114 and Chrome > 114 pass) Thank you for the test case, I will take a look today. Oh it seems with current bindings generator implementation, for `optional FormValue? state`, we can't differentiate between explicit `null` / `undefined` and a missing argument. I am aware the bug is about first parameter, `value`, yet this fact ^^ affects the approach on how to fix it. Pull request: https://github.com/WebKit/WebKit/pull/15741 Committed 266126@main (b691e0b9a450): <https://commits.webkit.org/266126@main> Reviewed commits have been landed. Closing PR #15741 and removing active labels. |
Created attachment 466930 [details] Testcase Trying to remove a form-associated custom element's value via `.internals.setFormValue(null)` fails silently -- the old value appears during form submission and `FormData` construction on the parent form. I've attached a test-case to demonstrate the issue. (Firefox 114 and Chrome 114 pass)