Closed
Bug 1365398
Opened 8 years ago
Closed 5 years ago
preventDefault() during a checkbox click event should revert the checkbox's checkedness
Categories
(Core :: DOM: Core & HTML, enhancement, P3)
Core
DOM: Core & HTML
Tracking
()
RESOLVED
DUPLICATE
of bug 1610821
People
(Reporter: d, Assigned: jdai)
References
Details
Comment 1•8 years ago
|
||
Hmm, our implementation in HTMLInputElement.cpp does follow the spec. But if the element is not connected, we early return in HTMLInputElement::GetEventTargetParent [1] and the default activation behavior is not ran. There is an old bug for this, bug 329509.
So, changing the test a bit by putting the checkbox in the document [2] works.
[1] http://searchfox.org/mozilla-central/rev/9a7fbdee1d54f99cd548af95b81231d80e5f9ad1/dom/html/HTMLInputElement.cpp#3620-3622
[2] https://jsfiddle.net/jessi3py/028b18pj/1/
Comment 2•8 years ago
|
||
Does that mean we should submit a patch to revise that w3c test?
Comment 3•8 years ago
|
||
(In reply to Hsin-Yi Tsai [:hsinyi] from comment #2)
> Does that mean we should submit a patch to revise that w3c test?
Hmm we can do that, but it'd better if we figure out how to fix bug 329509.
Updated•8 years ago
|
Priority: -- → P3
Comment 4•6 years ago
|
||
Fixed by bug 329509. Tests are all green.
Status: NEW → RESOLVED
Closed: 6 years ago
Resolution: --- → FIXED
Assignee | ||
Comment 5•5 years ago
•
|
||
After fixed bug 329509, we can start fixing the WPT fail in http://w3c-test.org/html/semantics/forms/the-input-element/checkbox-click-events.html.
Assignee: nobody → jdai
Status: RESOLVED → REOPENED
Resolution: FIXED → ---
Assignee | ||
Comment 6•5 years ago
|
||
Assignee | ||
Comment 7•5 years ago
|
||
The WPT[1] has been fixed at bug 1610821.
[1] http://w3c-test.org/html/semantics/forms/the-input-element/checkbox-click-events.html
Status: REOPENED → RESOLVED
Closed: 6 years ago → 5 years ago
Resolution: --- → DUPLICATE
You need to log in
before you can comment on or make changes to this bug.
Description
•