afterUpdateElement on ENTER press #17

wants to merge 1 commit into


None yet
1 participant

onomojo commented Oct 6, 2010

Currently, if no element is selected in Autocomplete it defaults to the first element if a user presses ENTER. This isn't a good default especially when the users passes in an afterUpdateElement function. The user most likely wants to update the contents of a DOM object after an element is selected with the search results. If no element is selected an the user presses enter its more useful to send the text field content to the user defined afterUpdateElement so that the user can do their own custom search against the field rather than assuming the user wants the first element to be selected.

My changes basically allow a user to define their own search function using afterUpdateElement if no element is selected and ENTER is pressed. If the user doesn't pass in an afterUpdateElement the function behaves as it does now.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment