Bug 616251 - Sync UI: Disable auto-hyphenation in Firefox 4.0b8. r=mconnor a=blocking-beta8
authorPhilipp von Weitershausen <philipp@weitershausen.de>
Thu, 09 Dec 2010 18:29:34 -0800
changeset 59050 04a4bf3504aaa2214261e0b88f58c07479f360f6
parent 59049 405ab10d1d861e8c1ebd4c30b5c8de6123d40b14
child 59051 1a149c7a4fa24efc22df96c199fbbd664a1179bf
push id1
push usershaver@mozilla.com
push dateTue, 04 Jan 2011 17:58:04 +0000
reviewersmconnor, blocking-beta8
bugs616251
milestone2.0b8pre
Bug 616251 - Sync UI: Disable auto-hyphenation in Firefox 4.0b8. r=mconnor a=blocking-beta8
browser/base/content/syncGenericChange.js
browser/base/content/syncSetup.js
--- a/browser/base/content/syncGenericChange.js
+++ b/browser/base/content/syncGenericChange.js
@@ -237,21 +237,17 @@ let Change = {
         [valid, errorString] = gSyncUtils.validatePassword(this._firstBox);
       else
         [valid, errorString] = gSyncUtils.validatePassword(this._firstBox, this._secondBox);
     }
     else {
       if (!this._updatingPassphrase)
         return;
 
-      if (event.keyCode != event.DOM_VK_BACK_SPACE) {
-        this._passphraseBox.value = Weave.Utils.hyphenatePartialPassphrase(
-          this._passphraseBox.value);
-       }
-      valid = Weave.Utils.isPassphrase(this._passphraseBox.value);
+      valid = this._passphraseBox.value.length >= Weave.MIN_PP_LENGTH;
     }
 
     if (errorString == "")
       this._clearStatus();
     else
       this._updateStatusWithString(errorString, "error");
 
     this._statusRow.hidden = valid;
--- a/browser/base/content/syncSetup.js
+++ b/browser/base/content/syncSetup.js
@@ -193,20 +193,16 @@ var gSyncSetup = {
       case "wipeClient":
       case "wipeRemote":
         Weave.Svc.Prefs.set("firstSync", action);
         break;
     }
   },
 
   onPassphraseKeyUp: function (event) {
-    if (event.keyCode != event.DOM_VK_BACK_SPACE) {
-      let el = event.target;
-      el.value = Weave.Utils.hyphenatePartialPassphrase(el.value);
-    }
     this.checkFields();
   },
 
   // fun with validation!
   checkFields: function () {
     this.wizard.canAdvance = this.readyToAdvance();
   },
 
@@ -221,18 +217,18 @@ var gSyncSetup = {
         }
         if (this._usingMainServers)
           return document.getElementById("tos").checked;
 
         return true;
       case EXISTING_ACCOUNT_LOGIN_PAGE:
         let hasUser = document.getElementById("existingAccountName").value != "";
         let hasPass = document.getElementById("existingPassword").value != "";
-        let hasKey = Weave.Utils.isPassphrase(
-          document.getElementById("existingPassphrase").value);
+        let hasKey = document.getElementById("existingPassphrase")
+                             .value.length >= Weave.MIN_PP_LENGTH;
 
         if (hasUser && hasPass && hasKey) {
           if (this._usingMainServers)
             return true;
 
           if (this._validateServer(document.getElementById("existingServer"), false))
             return true;
         }