aboutsummaryrefslogtreecommitdiffstats
path: root/components/script
diff options
context:
space:
mode:
authorbors-servo <lbergstrom+bors@mozilla.com>2020-03-12 13:38:47 -0400
committerGitHub <noreply@github.com>2020-03-12 13:38:47 -0400
commit6ab923c8e8172ce1a4944b85cac549fa99ec9f4d (patch)
tree5db2af491002898de4c593e0eb96a5c18157bc60 /components/script
parent38f0c35b74df71f3a49e0a2109cf617a7f451b74 (diff)
parent62847950783be6eae3c88147b934897c955599f7 (diff)
downloadservo-6ab923c8e8172ce1a4944b85cac549fa99ec9f4d.tar.gz
servo-6ab923c8e8172ce1a4944b85cac549fa99ec9f4d.zip
Auto merge of #25948 - NeverHappened:accept-only-connected-attributes-for-checkbox-radio-activation, r=jdm
Accept only connected attributes for checkbox and radio activation behavior <!-- Please describe your changes on the following line: --> Accept only connected attributes for checkbox and radio activation behavior --- <!-- Thank you for contributing to Servo! Please replace each `[ ]` by `[X]` when the step is complete, and replace `___` with appropriate data: --> - [x] `./mach build -d` does not report any errors - [x] `./mach test-tidy` does not report any errors - [x] These changes fix #25906 - [x] WPT tests were already here
Diffstat (limited to 'components/script')
-rwxr-xr-xcomponents/script/dom/htmlinputelement.rs3
1 files changed, 3 insertions, 0 deletions
diff --git a/components/script/dom/htmlinputelement.rs b/components/script/dom/htmlinputelement.rs
index a5fefa095ae..c27d5b2f9b5 100755
--- a/components/script/dom/htmlinputelement.rs
+++ b/components/script/dom/htmlinputelement.rs
@@ -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"));