WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
258870
ElementInternals.setFormValue(<nullish value>) doesn't clear submission value
https://bugs.webkit.org/show_bug.cgi?id=258870
Summary
ElementInternals.setFormValue(<nullish value>) doesn't clear submission value
fayti1703
Reported
2023-07-05 01:42:35 PDT
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)
Attachments
Testcase
(785 bytes, text/html)
2023-07-05 01:42 PDT
,
fayti1703
no flags
Details
View All
Add attachment
proposed patch, testcase, etc.
Alexey Shvayka
Comment 1
2023-07-05 12:05:53 PDT
(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.
Radar WebKit Bug Importer
Comment 2
2023-07-05 12:18:34 PDT
<
rdar://problem/111802198
>
Alexey Shvayka
Comment 3
2023-07-05 12:43:40 PDT
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.
Alexey Shvayka
Comment 4
2023-07-11 07:38:56 PDT
Pull request:
https://github.com/WebKit/WebKit/pull/15741
EWS
Comment 5
2023-07-18 07:31:21 PDT
Committed
266126@main
(b691e0b9a450): <
https://commits.webkit.org/266126@main
> Reviewed commits have been landed. Closing PR #15741 and removing active labels.
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug