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)

enhancement

Tracking

()

RESOLVED DUPLICATE of bug 1610821

People

(Reporter: d, Assigned: jdai)

References

Details

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/
Does that mean we should submit a patch to revise that w3c test?
(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.
Priority: -- → P3

Fixed by bug 329509. Tests are all green.

Status: NEW → RESOLVED
Closed: 6 years ago
Resolution: --- → FIXED
Assignee: nobody → jdai
Status: RESOLVED → REOPENED
Resolution: FIXED → ---
Status: REOPENED → RESOLVED
Closed: 6 years ago5 years ago
Resolution: --- → DUPLICATE
You need to log in before you can comment on or make changes to this bug.