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

git-svn-id: svn://10.0.0.236/trunk@181104 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
gavin%gavinsharp.com 2005-09-28 02:48:48 +00:00
parent 3ff2e3c1b5
commit 2e834d122e

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;