Bug 590861 - return button appears instead of the close application button [r=mfinkle]
authorVivien Nicolas <21@vingtetun.org>
Fri, 27 Aug 2010 10:25:04 +0200
changeset 66509 53cca13d1881775711cc9300cd28982e357d371a
parent 66508 03aa50af67cb4c2263141a8765085ccac717a0ec
child 66510 0dd8fedf01f733c52c0e3fcd95c5c5b69de0fc13
push id1
push userroot
push dateTue, 26 Apr 2011 22:38:44 +0000
treeherdermozilla-beta@bfdb6e623a36 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersmfinkle
bugs590861
Bug 590861 - return button appears instead of the close application button [r=mfinkle]
mobile/chrome/content/browser-ui.js
--- a/mobile/chrome/content/browser-ui.js
+++ b/mobile/chrome/content/browser-ui.js
@@ -240,26 +240,29 @@ var BrowserUI = {
   },
 
   _activePanel: null,
   get activePanel() {
     return this._activePanel;
   },
 
   set activePanel(aPanel) {
+    if (this._activePanel == aPanel)
+      return;
+
     let container = document.getElementById("awesome-panels");
     if (aPanel) {
       container.hidden = false;
       aPanel.open();
     } else {
       container.hidden = true;
       BrowserUI.showToolbar(false);
     }
 
-    if (this._activePanel && this._activePanel != aPanel)
+    if (this._activePanel)
       this._activePanel.close();
     this._activePanel = aPanel;
   },
 
   get activeDialog() {
     // Return the topmost dialog
     if (this._dialogs.length)
       return this._dialogs[this._dialogs.length - 1];