mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-12-03 10:33:33 +00:00
Bug 250817 nsWidgetStateManager assumes first element returned by getElementsByAttribute is its child
Toolkit version p=me+other, r=mconnor
This commit is contained in:
parent
f55cf75a68
commit
a58c184dbf
@ -260,7 +260,7 @@ nsWidgetStateManager.prototype =
|
||||
var element = gCurrentWindow.document.getElementById(aElementID);
|
||||
wsm.generic_Set(element, aDataObject);
|
||||
if ("value" in aDataObject)
|
||||
element.selectedItem = element.getElementsByAttribute("value", aDataObject.value)[0];
|
||||
element.value = aDataObject.value;
|
||||
if ("disabled" in aDataObject)
|
||||
element.disabled = aDataObject.disabled;
|
||||
},
|
||||
|
@ -20,8 +20,21 @@
|
||||
</getter>
|
||||
</property>
|
||||
|
||||
<property name="value" onset="this.setAttribute('value',val); return val;"
|
||||
onget="return this.getAttribute('value');"/>
|
||||
<property name="value" onget="return this.getAttribute('value');">
|
||||
<setter>
|
||||
<![CDATA[
|
||||
this.setAttribute("value", val);
|
||||
var children = this._getRadioChildren();
|
||||
for (var i = 0; i < children.length; i++) {
|
||||
if (children[i].value == val) {
|
||||
this.selectedItem = children[i];
|
||||
break;
|
||||
}
|
||||
}
|
||||
return val;
|
||||
]]>
|
||||
</setter>
|
||||
</property>
|
||||
<property name="disabled">
|
||||
<getter>
|
||||
<![CDATA[
|
||||
@ -89,7 +102,7 @@
|
||||
alreadySelected = val.getAttribute("selected") == "true";
|
||||
val.setAttribute("focused", focused);
|
||||
val.setAttribute("selected", "true");
|
||||
this.value = val.value;
|
||||
this.setAttribute("value", val.value);
|
||||
}
|
||||
|
||||
// uncheck all other group nodes
|
||||
|
Loading…
Reference in New Issue
Block a user