Skip to content
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

Autocomplete when pressing Tab in same way it works when pressing Return #258

Closed
steswinbank opened this issue May 23, 2013 · 5 comments
Closed
Milestone

Comments

@steswinbank
Copy link
Contributor

Hi

Would it be possible to amend Typeahead so that a user can start typing, use the down-arrow to navigate to an option and then hit Tab to select that item? Currently this only works by pressing Return. Tab takes the focus to the next tabbable element leaving the text input with what the user typed in only. The desired behaviour would be for the selection of autocomplete option to take place if the user navigates to an option and then presses either Tab or Return.

Thanks
Ste

@jharding
Copy link
Contributor

Implementing this behavior should be possible. I'll look into doing it some time in the future or if someone wants to work on it, I'll accept a pull request.

@sprat
Copy link

sprat commented Jul 3, 2013

Sorry but, can this be implemented as an option? We have a requirement not to auto select the first item when tab is pressed. Otherwise, how can this be achieved?

@jharding
Copy link
Contributor

jharding commented Jul 3, 2013

Probably won't change this to being configurable through an option, but if you want to remove it, just remove tabKeyed from this line.

nathan-muir pushed a commit to nathan-muir/typeahead.js that referenced this issue Nov 13, 2013
Added 'tabKeyed' to trigger of _handleSelection as requested in twitter#258
@Amerr
Copy link

Amerr commented Dec 16, 2015

+1

@imolorhe
Copy link

imolorhe commented Jul 2, 2016

@jharding I think it should be configurable. I have a use case where I have two textboxes beside each other with the autocomplete. I don't want the first value to be selected when the person means to just go to the next textbox.

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

No branches or pull requests

5 participants