How I can access the search term entered by the user ?
I've read http://api.jqueryui.com/autocomplete/ and https://github.com/jquery/jquery-ui/blob/master/ui/autocomplete.js , but don't get it...
For example, user types in "sna", and gets a menu with autocomplete candidates:
- snake
- snatch
- snapfish
The user presses KEYDOWN, the autocomplete input field is populated immediately with "snake".
At this moment, I want get the previous, original value of the input field, "sna".
How I can accomplish that ? (programmatically, without pressing the ESC key).