Bug 1819769 - don't dispatch a11y related events when there are no listeners, r=masayuki
Differential Revision: https://phabricator.services.mozilla.com/D175016
This commit is contained in:
@@ -3728,8 +3728,10 @@ nsresult HTMLInputElement::PostHandleEvent(EventChainPostVisitor& aVisitor) {
|
||||
#ifdef ACCESSIBILITY
|
||||
// Fire an event to notify accessibility
|
||||
if (mType == FormControlType::InputCheckbox) {
|
||||
FireEventForAccessibility(this, eFormCheckboxStateChange);
|
||||
} else {
|
||||
if (nsContentUtils::MayHaveFormCheckboxStateChangeListeners()) {
|
||||
FireEventForAccessibility(this, eFormCheckboxStateChange);
|
||||
}
|
||||
} else if (nsContentUtils::MayHaveFormRadioStateChangeListeners()) {
|
||||
FireEventForAccessibility(this, eFormRadioStateChange);
|
||||
// Fire event for the previous selected radio.
|
||||
nsCOMPtr<nsIContent> content = do_QueryInterface(aVisitor.mItemData);
|
||||
|
||||
Reference in New Issue
Block a user