Bug 310194: Change events can get fired multiple times for preference elements, patch by Dave Townsend <mossop@blueprintit.co.uk>, r=mconnor

This commit is contained in:
gavin%gavinsharp.com 2005-09-28 02:48:48 +00:00
parent fea7d4fb9c
commit 1b6d9f88d6

View File

@ -35,7 +35,6 @@
var preference = this.childNodes[i];
if (preference.name == aData) {
preference.value = preference.valueFromPreferences;
this.fireChangedEvent(preference);
}
}
]]>
@ -138,13 +137,14 @@
<parameter name="aUpdate"/>
<body>
<![CDATA[
this._value = aValue;
if (this.instantApply && aUpdate)
this.valueFromPreferences = aValue;
else if (aUpdate) {
if (aUpdate && this.value != aValue) {
this._value = aValue;
if (this.instantApply)
this.valueFromPreferences = aValue;
this.preferences.fireChangedEvent(this);
}
else {
else if (!aUpdate) {
this._value = aValue;
this.updateElements();
}
return aValue;