Bug 1341019 - Fix undef item variable in _onChanged(). r=standard8
MozReview-Commit-ID: 1WrioG5O0Np
--- a/toolkit/content/widgets/autocomplete.xml
+++ b/toolkit/content/widgets/autocomplete.xml
@@ -1369,20 +1369,20 @@ extends="chrome://global/content/binding
item.collapsed = false;
} else {
// set the class at the end so we can use the attributes
// in the xbl constructor
item.className = "autocomplete-richlistitem";
this.richlistbox.appendChild(item);
}
- if (typeof item.onChanged == "function") {
+ if (typeof item._onChanged == "function") {
// The binding may have not been applied yet.
setTimeout(() => {
- item.onChanged();
+ item._onChanged();
}, 0);
}
this._currentIndex++;
}
if (typeof this.onResultsAdded == "function")
this.onResultsAdded();
@@ -2042,20 +2042,21 @@ extends="chrome://global/content/binding
return this._textToSubURI.unEscapeURIForUI("UTF-8", url);
]]>
</body>
</method>
<method name="_onChanged">
<body>
<![CDATA[
- let iconChanged = item.adjustSiteIconStart(this.popup._siteIconStart);
+ let popup = this.parentNode.parentNode;
+ let iconChanged = this.adjustSiteIconStart(popup._siteIconStart);
if (iconChanged) {
- item.handleOverUnderflow();
+ this.handleOverUnderflow();
}
]]>
</body>
</method>
<method name="_reuseAcItem">
<body>