Bug 666257 - Connect to Sync popup is not dismissed when device Back button is tapped in Awesome bar/Desktop Tab (r=mbrubeck)
authorLucas Rocha <lucasr@mozilla.com>
Fri, 19 Aug 2011 09:29:23 -0700
changeset 75545 d73f45cc050613c69a084e52c75fd57c3525a681
parent 75544 82b14f7ed86d736696fbe68e9a6d0ae891f59be6
child 75546 1f7abb28b2768d2bca860ceb08cbe44826e90521
push id1341
push usermbrubeck@mozilla.com
push dateFri, 19 Aug 2011 16:29:58 +0000
treeherdermozilla-inbound@1f7abb28b276 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersmbrubeck
bugs666257
milestone9.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 666257 - Connect to Sync popup is not dismissed when device Back button is tapped in Awesome bar/Desktop Tab (r=mbrubeck) Open sync dialog after panel to ensure correct dialog stacking.
mobile/chrome/content/browser-ui.js
--- a/mobile/chrome/content/browser-ui.js
+++ b/mobile/chrome/content/browser-ui.js
@@ -1258,37 +1258,39 @@ var BrowserUI = {
       case "cmd_bookmarks":
         this.activePanel = BookmarkList;
         break;
       case "cmd_history":
         this.activePanel = HistoryList;
         break;
       case "cmd_remoteTabs":
         if (Weave.Status.checkSetup() == Weave.CLIENT_NOT_CONFIGURED) {
+          // We have to set activePanel before showing sync's dialog
+          // to make the sure the dialog stacking is correct.
+          this.activePanel = RemoteTabsList;
           WeaveGlue.open();
         } else if (!Weave.Service.isLoggedIn && !Services.prefs.getBoolPref("browser.sync.enabled")) {
           // unchecked the relative command button
           document.getElementById("remotetabs-button").removeAttribute("checked");
           this.activePanel = null;
 
           BrowserUI.showPanel("prefs-container");
           let prefsBox = document.getElementById("prefs-list");
           let syncArea = document.getElementById("prefs-sync");
           if (prefsBox && syncArea) {
             let prefsBoxY = prefsBox.firstChild.boxObject.screenY;
             let syncAreaY = syncArea.boxObject.screenY;
             setTimeout(function() {
               prefsBox.scrollBoxObject.scrollTo(0, syncAreaY - prefsBoxY);
             }, 0);
           }
-
-          return;
+        } else {
+          this.activePanel = RemoteTabsList;
         }
 
-        this.activePanel = RemoteTabsList;
         break;
       case "cmd_quit":
         // Only close one window
         this._closeOrQuit();
         break;
       case "cmd_close":
         this._closeOrQuit();
         break;