Skip to content

afterUpdateElement on ENTER press #17

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

afterUpdateElement on ENTER press #17

wants to merge 1 commit into from

Conversation

onomojo
Copy link

@onomojo 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
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant