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

tab is always prevented #110

Open
magalhas opened this issue Jul 30, 2015 · 6 comments
Open

tab is always prevented #110

magalhas opened this issue Jul 30, 2015 · 6 comments

Comments

@magalhas
Copy link

I think the behaviour behind the TAB key is not good as it is... When I press tab the component picks the first option, which is nice, but if I press tab again I should go to the next focusable element in HTML. Moreover, I think this should happen when you hit TAB the first time.

What are your thoughts?

@clalimarmo
Copy link

I'd like to see either of these suggestions implemented.

@magalhas
Copy link
Author

I've got this implemented in #111 and I'm using it as of now.

@eeiswerth
Copy link

eeiswerth commented Sep 12, 2016

You could do something like this. It's not pretty, but it will get you moving forward in a bind.

document.addEventListener("keydown", function(e) {
    var parent = $(e.target).parent();
    if (e.which === 9 && parent.hasClass('typeahead')) {
        // Ignore it. Typeahead gobbles up tab, which sucks.
        e.stopImmediatePropagation();
    }
}, {capture: true});

@twuerker
Copy link

Are either of the mentioned PR's going to be merged? I would like to TAB to other input fields after a selection is made also.

@fmoo
Copy link
Owner

fmoo commented Jun 21, 2017

@twuerker - I'd like to pick @clalimarmo's #140, which has docs but a merge conflict. Ideally there would be a short test case as well.

If either of you update the PR, I'm more than happy to merge it in.

@stavlocker
Copy link

I think that regardless of the caret navigation, the tabbing shouldn't exist as currently you can't tab through even if you've selected an item. The arrow key navigation should be purely up/down/enter and shouldn't be messing with the tabbing. It's the most logical solution and the most intuitive one. Any progress on this?

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

No branches or pull requests

6 participants