Bug 1888507 - Do not dispatch input, change for detached checkbox, radio. r=dom-core,sefeng
Differential Revision: https://phabricator.services.mozilla.com/D217408
This commit is contained in:
@@ -4106,7 +4106,9 @@ void HTMLInputElement::ActivationBehavior(EventChainPostVisitor& aVisitor) {
|
||||
return;
|
||||
}
|
||||
|
||||
if (mCheckedIsToggled) {
|
||||
// https://html.spec.whatwg.org/#checkbox-state-(type=checkbox):input-activation-behavior
|
||||
// If element is connected, fire input and change event
|
||||
if (mCheckedIsToggled && IsInComposedDoc()) {
|
||||
SetUserInteracted(true);
|
||||
|
||||
// Fire input event and then change event.
|
||||
|
||||
Reference in New Issue
Block a user