Bug 1566786 - don't leave stop/reload button without an icon if the animation gets cancelled, r=dao

Differential Revision: https://phabricator.services.mozilla.com/D63084

--HG--
extra : moz-landing-system : lando
This commit is contained in:
Gijs Kruitbosch 2020-02-17 17:27:08 +00:00
Родитель d60077a1a1
Коммит 766d80fdda
1 изменённых файлов: 3 добавлений и 0 удалений

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

@ -5808,6 +5808,7 @@ var CombinedStopReload = {
this._cancelTransition();
this.stop.removeEventListener("click", this);
this.stopReloadContainer.removeEventListener("animationend", this);
this.stopReloadContainer.removeEventListener("animationcancel", this);
this.stopReloadContainer = null;
this.reload = null;
this.stop = null;
@ -5820,6 +5821,7 @@ var CombinedStopReload = {
this._stopClicked = true;
}
break;
case "animationcancel":
case "animationend": {
if (
event.target.classList.contains("toolbarbutton-animatable-image") &&
@ -5856,6 +5858,7 @@ var CombinedStopReload = {
Services.prefs.getBoolPref("browser.stopReloadAnimation.enabled");
Services.prefs.addObserver("toolkit.cosmeticAnimations.enabled", this);
this.stopReloadContainer.addEventListener("animationend", this);
this.stopReloadContainer.addEventListener("animationcancel", this);
},
onTabSwitch() {