Bug 1042561 - Autocomplete: Typed text in red despite results/matches found if suggestions change by last input r=mak
☠☠ backed out by 9d219be15f7d ☠ ☠
authorJorg K <mozilla@jorgk.com>
Fri, 20 Mar 2015 11:18:07 +0100
changeset 251854 b798fd098e098dfd313176d15879db399d62bc55
parent 251853 8aede8703d12609c3aca797549e39711cf4617ca
child 251855 ef86c7c53d210dcfa697c010c34b655ca10ce232
push id1156
push userpbrosset@mozilla.com
push dateFri, 20 Mar 2015 16:00:24 +0000
reviewersmak
bugs1042561
milestone39.0a1
Bug 1042561 - Autocomplete: Typed text in red despite results/matches found if suggestions change by last input r=mak
toolkit/components/autocomplete/nsAutoCompleteController.cpp
--- a/toolkit/components/autocomplete/nsAutoCompleteController.cpp
+++ b/toolkit/components/autocomplete/nsAutoCompleteController.cpp
@@ -1500,17 +1500,17 @@ nsAutoCompleteController::ProcessResult(
     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 || !minResults) {
       OpenPopup();
-    } else if (result != nsIAutoCompleteResult::RESULT_NOMATCH_ONGOING) {
+    } else if (mSearchesOngoing == 0) {
       ClosePopup();
     }
   }
 
   if (result == nsIAutoCompleteResult::RESULT_SUCCESS ||
       result == nsIAutoCompleteResult::RESULT_SUCCESS_ONGOING) {
     // Try to autocomplete the default index for this search.
     CompleteDefaultIndex(resultIndex);