Bug 1526667 - Close the Quantumbar popup when the browser window resizes. r=mak

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

--HG--
extra : moz-landing-system : lando
This commit is contained in:
Dão Gottwald 2019-02-10 13:07:27 +00:00
Родитель 5e3bffe964
Коммит 27f8d37b90
1 изменённых файлов: 8 добавлений и 0 удалений

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

@ -497,9 +497,17 @@ class UrlbarView {
_on_popupshowing() {
this._enableOrDisableOneOffSearches();
this.window.addEventListener("resize", this);
}
_on_popuphiding() {
this.controller.cancelQuery();
this.window.removeEventListener("resize", this);
}
_on_resize() {
// Close the popup as it would be wrongly sized. This can
// happen when using special OS resize functions like Win+Arrow.
this.close();
}
}