Bug 496235 - Menulist should not set current item to null when using an out-of-range value for selectedIndex. r=enn

This commit is contained in:
Henrik Skupin 2009-08-14 23:16:02 +02:00
parent 1d045ec5d3
commit 624774635b

View File

@ -181,11 +181,13 @@
<setter>
<![CDATA[
var popup = this.menupopup;
if (popup && 0 <= val && val < popup.childNodes.length)
this.selectedItem = popup.childNodes[val];
if (popup && 0 <= val) {
if (val < popup.childNodes.length)
this.selectedItem = popup.childNodes[val];
}
else
this.selectedItem = null;
return val;
return val;
]]>
</setter>
</property>