Bug 1702125 - Only automatically add/remove open state on buttons on anchored arrowpanel events. r=Gijs

Differential Revision: https://phabricator.services.mozilla.com/D110812
This commit is contained in:
Mike Conley 2021-04-06 14:19:27 +00:00
Родитель 495a0b1eab
Коммит 8754752264
1 изменённых файлов: 12 добавлений и 12 удалений

Просмотреть файл

@ -202,13 +202,13 @@
if (this.isArrowPanel && event.target == this) {
this.removeAttribute("animating");
this.setAttribute("panelopen", "true");
}
if (this.isAnchored && this.anchorNode) {
let anchorRoot =
this.anchorNode.closest("toolbarbutton, .anchor-root") ||
this.anchorNode;
anchorRoot.setAttribute("open", "true");
if (this.isAnchored && this.anchorNode) {
let anchorRoot =
this.anchorNode.closest("toolbarbutton, .anchor-root") ||
this.anchorNode;
anchorRoot.setAttribute("open", "true");
}
}
// Fire event for accessibility APIs
@ -229,13 +229,13 @@
} else if (animate) {
this.setAttribute("animate", "cancel");
}
}
if (this.isAnchored && this.anchorNode) {
let anchorRoot =
this.anchorNode.closest("toolbarbutton, .anchor-root") ||
this.anchorNode;
anchorRoot.removeAttribute("open");
if (this.isAnchored && this.anchorNode) {
let anchorRoot =
this.anchorNode.closest("toolbarbutton, .anchor-root") ||
this.anchorNode;
anchorRoot.removeAttribute("open");
}
}
try {