Bug 1173196 - Ignore 'transitionend' events for unrelated properties when minimizing or maximizing the toolbox. r=pbrosset

--HG--
extra : rebase_source : 0340587c4492c1b423346de7840c1f4cade5496f
This commit is contained in:
Sami Jaktholm 2015-06-17 16:24:25 +03:00
Родитель f61ce95d61
Коммит 6821ffaba9
1 изменённых файлов: 12 добавлений и 2 удалений

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

@ -106,7 +106,12 @@ BottomHost.prototype = {
}
this.isMinimized = true;
let onTransitionEnd = () => {
let onTransitionEnd = event => {
if (event.propertyName !== "margin-bottom") {
// Ignore transitionend on unrelated properties.
return;
}
this.frame.removeEventListener("transitionend", onTransitionEnd);
this.emit("minimized");
};
@ -125,7 +130,12 @@ BottomHost.prototype = {
}
this.isMinimized = false;
let onTransitionEnd = () => {
let onTransitionEnd = event => {
if (event.propertyName !== "margin-bottom") {
// Ignore transitionend on unrelated properties.
return;
}
this.frame.removeEventListener("transitionend", onTransitionEnd);
this.emit("maximized");
};