Bug 530142 - Account Settings copies "Reply-To Address" between accounts when selected. r=IanN,r=Standard8
authoraceman <acelists@atlas.sk>
Tue, 28 Feb 2012 12:20:20 +0000
changeset 10958 fea6ed5b3918f948c048ed1831aec03076e09dca
parent 10957 0859442f85b2131af9c75491a9c3520c3bddf87a
child 10959 3104846ab504e7138d5e6cd186527d2bc1e3590e
push id463
push userbugzilla@standard8.plus.com
push dateTue, 24 Apr 2012 17:34:51 +0000
treeherdercomm-beta@e53588e8f7b0 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersIanN, Standard8
bugs530142
Bug 530142 - Account Settings copies "Reply-To Address" between accounts when selected. r=IanN,r=Standard8
mailnews/base/prefs/content/AccountManager.js
--- a/mailnews/base/prefs/content/AccountManager.js
+++ b/mailnews/base/prefs/content/AccountManager.js
@@ -932,22 +932,17 @@ function getFormElementValue(formElement
       if (formElement.value) {
         var localfile = Components.classes["@mozilla.org/file/local;1"].createInstance(Components.interfaces.nsILocalFile);
 
         localfile.initWithPath(formElement.value);
         return localfile;
       }
       return null;
     }
-    if (type == "text") {
-      var val = formElement.getAttribute("value");
-      if (val) return val;
-      return null;
-    }
-    if ("value" in formElement) {
+    if ((type == "textbox") || ("value" in formElement)) {
       return formElement.value;
     }
     return null;
   }
   catch (ex) {
     dump("getFormElementValue failed, ex="+ex+"\n");
   }
   return null;
@@ -1000,22 +995,22 @@ function setFormElementValue(formElement
 
     } else {
       if ("defaultValue" in formElement)
         formElement.value = formElement.defaultValue;
       else
         formElement.value = "";
     }
   }
-
-  else if (type == "text") {
-    if (value == null || value == undefined)
-      formElement.removeAttribute("value");
-    else
-      formElement.setAttribute("value",value);
+  else if (type == "textbox") {
+    if (value == null || value == undefined) {
+      formElement.value = null;
+    } else {
+      formElement.value = value;
+    }
   }
 
   // let the form figure out what to do with it
   else {
     if (value == undefined) {
       if ("defaultValue" in formElement && formElement.defaultValue)
         formElement.value = formElement.defaultValue;
     }