зеркало из https://github.com/mozilla/gecko-dev.git
Bug 823990 - Autocomplete results should not disappear for no results when minResults == 0. r=mak
This commit is contained in:
Родитель
6997a3f36d
Коммит
40997b056e
|
@ -587,7 +587,11 @@ nsAutoCompleteController::HandleDelete(bool *_retval)
|
|||
// Nothing left in the popup, clear any pending search timers and
|
||||
// close the popup.
|
||||
ClearSearchTimer();
|
||||
ClosePopup();
|
||||
uint32_t minResults;
|
||||
input->GetMinResultsForPopup(&minResults);
|
||||
if (minResults) {
|
||||
ClosePopup();
|
||||
}
|
||||
}
|
||||
|
||||
return NS_OK;
|
||||
|
@ -1344,10 +1348,13 @@ nsAutoCompleteController::ProcessResult(int32_t aSearchIndex, nsIAutoCompleteRes
|
|||
NS_ENSURE_TRUE(popup != nullptr, NS_ERROR_FAILURE);
|
||||
popup->Invalidate();
|
||||
|
||||
uint32_t minResults;
|
||||
input->GetMinResultsForPopup(&minResults);
|
||||
|
||||
// Make sure the popup is open, if necessary, since we now have at least one
|
||||
// search result ready to display. Don't force the popup closed if we might
|
||||
// get results in the future to avoid unnecessarily canceling searches.
|
||||
if (mRowCount) {
|
||||
if (mRowCount || !minResults) {
|
||||
OpenPopup();
|
||||
} else if (result != nsIAutoCompleteResult::RESULT_NOMATCH_ONGOING) {
|
||||
ClosePopup();
|
||||
|
|
Загрузка…
Ссылка в новой задаче