mirror of
https://github.com/servo/servo.git
synced 2025-08-06 22:15:33 +01:00
Accept only connected attributes for checkbox and radio activation behaviour
This commit is contained in:
parent
4b1bb895a3
commit
6284795078
2 changed files with 3 additions and 12 deletions
|
@ -2488,6 +2488,9 @@ impl Activatable for HTMLInputElement {
|
|||
// https://html.spec.whatwg.org/multipage/#checkbox-state-(type=checkbox):activation-behavior
|
||||
// https://html.spec.whatwg.org/multipage/#radio-button-state-(type=radio):activation-behavior
|
||||
// Check if document owner is fully active
|
||||
if !self.upcast::<Node>().is_connected() {
|
||||
return ();
|
||||
}
|
||||
let target = self.upcast::<EventTarget>();
|
||||
target.fire_bubbling_event(atom!("input"));
|
||||
target.fire_bubbling_event(atom!("change"));
|
||||
|
|
|
@ -2,21 +2,9 @@
|
|||
[attached to shadow dom radio should emit input and change events on click().]
|
||||
expected: FAIL
|
||||
|
||||
[detached checkbox should not emit input or change events on click().]
|
||||
expected: FAIL
|
||||
|
||||
[attached to shadow dom checkbox should emit input and change events on click().]
|
||||
expected: FAIL
|
||||
|
||||
[detached radio should not emit input or change events on click().]
|
||||
expected: FAIL
|
||||
|
||||
[detached radio should not emit input or change events on dispatchEvent(new MouseEvent('click')).]
|
||||
expected: FAIL
|
||||
|
||||
[detached checkbox should not emit input or change events on dispatchEvent(new MouseEvent('click')).]
|
||||
expected: FAIL
|
||||
|
||||
[attached to shadow dom checkbox should emit input and change events on dispatchEvent(new MouseEvent('click')).]
|
||||
expected: FAIL
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue