Bug 1067367 - Tapping the icon of a second doorhanger reopens the first doorhanger if it was already open. r=Enn, a=sledru
authorFlorian Quèze <florian@queze.net>
Mon, 29 Sep 2014 15:33:34 +0200
changeset 218000 3ff9831143fd6c912f644ab6346fea401ed0604a
parent 217999 737fbc0e3df496a07945ed66cbbede2d2bd8da1a
child 218001 19338c25065c86a2692b7ad3d4ac25b5408aeaab
push id515
push userraliiev@mozilla.com
push dateMon, 06 Oct 2014 12:51:51 +0000
treeherdermozilla-release@267c7a481bef [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersEnn, sledru
bugs1067367
milestone33.0
Bug 1067367 - Tapping the icon of a second doorhanger reopens the first doorhanger if it was already open. r=Enn, a=sledru
toolkit/modules/PopupNotifications.jsm
--- a/toolkit/modules/PopupNotifications.jsm
+++ b/toolkit/modules/PopupNotifications.jsm
@@ -483,19 +483,25 @@ PopupNotifications.prototype = {
     if (browser)
       browser.focus();
   },
 
   /**
    * Hides the notification popup.
    */
   _hidePanel: function PopupNotifications_hide() {
+    // We need to disable the closing animation when setting _ignoreDismissal
+    // to true, otherwise the popuphidden event will fire after we have set
+    // _ignoreDismissal back to false.
+    let transitionsEnabled = this.transitionsEnabled;
+    this.transitionsEnabled = false;
     this._ignoreDismissal = true;
     this.panel.hidePopup();
     this._ignoreDismissal = false;
+    this.transitionsEnabled = transitionsEnabled;
   },
 
   /**
    * Removes all notifications from the notification popup.
    */
   _clearPanel: function () {
     let popupnotification;
     while ((popupnotification = this.panel.lastChild)) {