Bug 580193 - Sending application in background using Back button causes focused tab to close [r=mfinkle]
authorMatt Brubeck <mbrubeck@mozilla.com>
Thu, 22 Jul 2010 15:42:39 -0400
changeset 66385 3e18409102780411cf1e98a36282296da65c94d0
parent 66384 3fba1d5da9cb31053b50e3359ceef52e50434792
child 66386 cc42913918da92cfcdccd5a62fc1ac6402137c8a
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
bugs580193
Bug 580193 - Sending application in background using Back button causes focused tab to close [r=mfinkle]
mobile/chrome/content/browser-ui.js
--- a/mobile/chrome/content/browser-ui.js
+++ b/mobile/chrome/content/browser-ui.js
@@ -681,28 +681,23 @@ var BrowserUI = {
       this.hidePanel();
       return;
     }
 
     // Only if there are no dialogs, popups, or panels open
     let tab = Browser.selectedTab;
     let browser = tab.browser;
 
-    if (browser.canGoBack) {
+    if (browser.canGoBack)
       browser.goBack();
-    } else if (tab.owner) {
+    else if (tab.owner)
       this.closeTab(tab);
-    }
 #ifdef ANDROID
-    else if (Browser.tabs.length == 1) {
-      this.doCommand("cmd_quit");
-    } else {
-      this.closeTab(tab);
+    else
       window.QueryInterface(Ci.nsIDOMChromeWindow).minimize();
-    }
 #endif
   },
 
   handleEvent: function handleEvent(aEvent) {
     switch (aEvent.type) {
       // Browser events
       case "TabSelect":
         this._tabSelect(aEvent);