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

use a null default tabindex so that the select is tabbable in a form... #37

Merged

Conversation

joshuaconner
Copy link
Contributor

…the way you'd expect it to be.

The previous behavior was that selects were given a default tabindex of 1, which made tabbing through a form not work the way you'd expect. Let me know if you have any questions and thank you for a handy component!

(as a workaround, you can pass tabindex=null to the component, this just makes that the default)

@Robdel12
Copy link
Collaborator

Robdel12 commented Jul 1, 2015

Thanks for the PR! Wouldn't tabindex=0 do the same thing? Maybe that should be the default rather 1 :)

@joshuaconner
Copy link
Contributor Author

Dang I guess I should have actually looked at how tabindex works:

Tab order is as follows:

  1. elements with a positive tabIndex. Elements that have identical tabIndexes should be navigated in the order they appear. Navigation proceeds from the lowest tabIndex to the highest tabIndex.
  2. Elements that do not support the tabIndex attribute or support it and assign tabIndex to "0", in the order they appear.

Updated, thanks for that! (also fixed my test so Travis will pass)

@Robdel12 Robdel12 merged commit 0cf7f9f into adopted-ember-addons:master Jul 1, 2015
@Robdel12
Copy link
Collaborator

Robdel12 commented Jul 1, 2015

Thanks for the PR!! :D

@joshuaconner joshuaconner deleted the no-default-tabindex branch July 24, 2015 01:28
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.

2 participants