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

Fixes focus highlighting on disabled chosen select boxes (Chrome, Windows) #1994

Merged
merged 1 commit into from
Mar 28, 2015
Merged

Fixes focus highlighting on disabled chosen select boxes (Chrome, Windows) #1994

merged 1 commit into from
Mar 28, 2015

Conversation

oriondean
Copy link
Contributor

Clicking on a disabled chosen element focuses it and shows a highlight border around the element.
You can view an example here: http://jsfiddle.net/HpACF/

This is caused by tabindex -1 being added to the chosen-single anchor tag.
Any anchor tag without an href attribute cannot be tabbed to or focused into.
By adding tabindex -1 to the anchor tag, it means that it can not be focused into via tabbing.

My fix removes this tabindex -1 attribute from the anchor tag.
This means that a disabled chosen select box is no longer focusable when disabled, removing the highlight border when clicking into the chosen element.

@pfiller pfiller added the target label Jul 2, 2014
@pfiller pfiller removed the target label Mar 28, 2015
@pfiller
Copy link
Contributor

pfiller commented Mar 28, 2015

Thanks, @oriondean. This looks good to me and I think I'd like to get it merged before this PR sits around for the full year.

pfiller added a commit that referenced this pull request Mar 28, 2015
Fixes focus highlighting on disabled Chosen
@pfiller pfiller merged commit 8325fe6 into harvesthq:master Mar 28, 2015
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