Bug 1562314 - read element.checked only if the <input> element is a checkbox in IM account wizard. r=jorgk DONTBUILD
authoraceman <acelists@atlas.sk>
Sun, 30 Jun 2019 01:16:06 +0200
changeset 35984 b7fc532744f4cbca9c88d55a7c14d6fce446bed2
parent 35983 6f3db64fae5570292b31c3ef06ce1bf5f8fabf84
child 35985 7302ce3d1e789d0493735a41662a44a8adc4e274
push id392
push userclokep@gmail.com
push dateMon, 02 Sep 2019 20:17:19 +0000
reviewersjorgk
bugs1562314
Bug 1562314 - read element.checked only if the <input> element is a checkbox in IM account wizard. r=jorgk DONTBUILD
mail/components/im/content/imAccountWizard.js
--- a/mail/components/im/content/imAccountWizard.js
+++ b/mail/components/im/content/imAccountWizard.js
@@ -358,17 +358,17 @@ var accountWizard = {
 
     return true;
   },
 
   getValue(aId) {
     var elt = document.getElementById(aId);
     if ("selectedItem" in elt)
       return elt.selectedItem.value;
-    if ("checked" in elt)
+    if ((elt.getAttribute("type") == "checkbox") && ("checked" in elt))
       return elt.checked;
     if ("value" in elt)
       return elt.value;
     // If the groupbox has never been opened, the binding isn't attached
     // so the attributes don't exist. The calling code in showSummary
     // has a special handling of the undefined value for this case.
     return undefined;
   },