Bug 453999 Bail out early when the autocomplete field is empty r=ajschult

This commit is contained in:
Neil Rashbrook 2008-09-07 11:00:17 +01:00
parent 632e8f0838
commit 58b96d68f9

View File

@ -594,6 +594,10 @@
<method name="startLookup">
<body><![CDATA[
var str = this.currentSearchString;
if (!str) {
this.closeResultPopup();
return;
}
this.isSearching = true;
this.mFirstReturn = true;
@ -709,13 +713,10 @@
if (this.mSessionReturns == 0 && this.mFailureCount == this.sessionCount) {
if (this.minResultsForPopup == 0) {
this.clearResults(true); // clear data and repaint empty
if (this.value) {
this.openResultPopup();
} else
this.closeResultPopup();
} else
this.openResultPopup();
} else {
this.closeResultPopup();
}
}
]]></body>
</method>