Bug 619795 - Cannot hit android "Back" button after connecting to Sync [r=mfinkle]
authorMatt Brubeck <mbrubeck@mozilla.com>
Wed, 12 Jan 2011 20:47:58 -0800
changeset 67248 51b46d490effd482b118fc30053bb7032b8fee42
parent 67247 989fd481e6e959694c84df9eb0b0eded92b52284
child 67249 12350e07fcace910f2137e52ed744b9c6bbe3523
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
bugs619795
Bug 619795 - Cannot hit android "Back" button after connecting to Sync [r=mfinkle]
mobile/chrome/content/sync.js
--- a/mobile/chrome/content/sync.js
+++ b/mobile/chrome/content/sync.js
@@ -77,21 +77,25 @@ let WeaveGlue = {
     if (!this.jpake)
       return;
 
     this.jpake.abort();
     this.jpake = null;
   },
 
   open: function open() {
+    let container = document.getElementById("syncsetup-container");
+    if (!container.hidden)
+      return;
+
     // Clear up any previous JPAKE codes
     this.abortEasySetup();
 
     // Show the connect UI
-    document.getElementById("syncsetup-container").hidden = false;
+    container.hidden = false;
     document.getElementById("syncsetup-jpake").hidden = false;
     document.getElementById("syncsetup-manual").hidden = true;
 
     BrowserUI.pushDialog(this);
 
     let self = this;
     this.jpake = new Weave.JPAKEClient({
       displayPIN: function displayPIN(aPin) {
@@ -168,17 +172,17 @@ let WeaveGlue = {
       serverURL: this._validateServer(this._elements.customserver.value.trim())
     };
 
     // Clear the UI so it's ready for next time
     this._elements.account.value = "";
     this._elements.password.value = "";
     this._elements.synckey.value = "";
     this._elements.usecustomserver.checked = false;
-    this._elements.customserver.disable = true;
+    this._elements.customserver.disabled = true;
     this._elements.customserver.value = "";
 
     // Close the connect UI
     document.getElementById("syncsetup-container").hidden = true;
     BrowserUI.popDialog();
   },
 
   toggleCustomServer: function toggleCustomServer() {