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:
@@ -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();
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user