Bug 1042561 - Autocomplete: Typed text in red despite results/matches found if suggestions change by last input r=mak
authorJorg K <mozilla@jorgk.com>
Sun, 22 Mar 2015 13:25:42 +0100
changeset 264157 d4a39def58114f2146efa7a363d079a1bdb6f28f
parent 264156 5c87c00175317df304dfbd6f96170d58b6f6ee69
child 264158 0d2789cdae9170c827cc0caef1b9b109551894db
push id4718
push userraliiev@mozilla.com
push dateMon, 11 May 2015 18:39:53 +0000
treeherdermozilla-beta@c20c4ef55f08 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersmak
bugs1042561
milestone39.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
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);