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 216878 3ff9831143fd
parent 216877 737fbc0e3df4
child 216879 19338c25065c
push id3951
push userryanvm@gmail.com
push date2014-09-29 18:48 +0000
treeherdermozilla-beta@19338c25065c [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)) {