mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-25 13:51:41 +00:00
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:
parent
1d045ec5d3
commit
624774635b
@ -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>
|
||||
|
Loading…
Reference in New Issue
Block a user