Bug 259781 - form associated checkbox not removed from form data once checked
Summary: form associated checkbox not removed from form data once checked
Status: NEW
Alias: None
Product: WebKit
Classification: Unclassified
Component: Forms (show other bugs)
Version: Safari 17
Hardware: Mac (Apple Silicon) macOS 13
: P2 Normal
Assignee: Nobody
URL:
Keywords: InRadar
Depends on:
Blocks: 154907
  Show dependency treegraph
 
Reported: 2023-08-03 09:15 PDT by David Enke
Modified: 2023-08-12 13:45 PDT (History)
8 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description David Enke 2023-08-03 09:15:38 PDT
Form associated custom element checkboxes are not removed from form data once unchecked.
If checked, the name and value are present in form data as expected.

Expected:
Once unchecked, the checkbox is not part of the derived form data.
https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input/checkbox#sect3

Actual:
Once unchecked, the name and value are still part of the form data and not removed.

Reproduction:
https://stackblitz.com/edit/safari-form-associated-checkbox-bug?file=index.html
Comment 1 Radar WebKit Bug Importer 2023-08-10 09:16:13 PDT
<rdar://problem/113696919>
Comment 2 Simon Fraser (smfr) 2023-08-12 10:41:43 PDT
Did this work in older Safari versions?
Comment 3 David Enke 2023-08-12 11:39:32 PDT
Good question. I have to check the repro in BrowserStack.
If I remember correctly, formAssociated custom elements have just been shipped recently…