Bug 998893 - Update the autocomplete search string when pressing DOM_VK_DOWN to initiate a search. r=mak

Some script may have changed the value of the text field since our last keypress or after our focus handler and we don't want to search for a stale string.
This commit is contained in:
Matthew Noorenberghe
2015-05-06 11:23:51 -07:00
parent 64fd1eecd5
commit ce47a65476
3 changed files with 77 additions and 0 deletions

View File

@@ -470,6 +470,13 @@ nsAutoCompleteController::HandleKeyNavigation(uint32_t aKey, bool *_retval)
return NS_OK;
}
// Some script may have changed the value of the text field since our
// last keypress or after our focus handler and we don't want to search
// for a stale string.
nsAutoString value;
input->GetTextValue(value);
mSearchString = value;
StartSearches();
}
}