Bug 825605 Avoid explicitly setting null as that actually sets the string 'null' r=Mnyromyr
authorNeil Rashbrook <neil@parkwaycc.co.uk>
Fri, 11 Jan 2013 00:24:43 +0000
changeset 14703 3646814ab76d857405e21d9dbccd4ee55365c2d7
parent 14702 bc4fa652cdf755a89743ec97c79131241d4d1446
child 14704 963cca7cce8ae31d6d1e6253ea1fc83bc2a31dcf
push id867
push userbugzilla@standard8.plus.com
push dateMon, 01 Apr 2013 20:44:27 +0000
treeherdercomm-beta@797726b8d244 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersMnyromyr
bugs825605
Bug 825605 Avoid explicitly setting null as that actually sets the string 'null' r=Mnyromyr
suite/mailnews/mailWidgets.xml
--- a/suite/mailnews/mailWidgets.xml
+++ b/suite/mailnews/mailWidgets.xml
@@ -832,17 +832,17 @@
           ]]>
         </getter>
       </property>
 
       <property name="value" onget="return this.internalValue;">
         <setter>
           <![CDATA[
             if (this.internalValue == val)
-              return;
+              return val;
             this.internalValue = val;
             var menulist = document.getAnonymousNodes(this)[0];
             menulist.selectedItem = this.validMenuitem;
 
             // now notify targets of new parent's value
             var targets = this.targets;
             if (targets) {
               for (var i=0; i < targets.length; i++) {
@@ -874,17 +874,17 @@
               return null;
 
             let menulist = document.getAnonymousNodes(this)[0];
             let isCustom = isNaN(this.value);
             let typedValue = isCustom ? this.value : parseInt(this.value);
 
             // custom attribute to style the unavailable menulist item
             menulist.setAttribute("unavailable",
-              (this.valueIds.indexOf(typedValue) < 0) ? "true" : null);
+              this.valueIds.indexOf(typedValue) < 0);
 
             // add a hidden menulist item if value is missing
             let menuitem = menulist.getElementsByAttribute("value", this.value).item(0);
             if (!menuitem)
             { // need to add a hidden menuitem
               menuitem = menulist.appendItem(this.valueLabel, this.value);
               menuitem.hidden = true;
             }