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

Element comparison could be improved! #4

Open
nathfn opened this issue Jun 13, 2018 · 0 comments
Open

Element comparison could be improved! #4

nathfn opened this issue Jun 13, 2018 · 0 comments

Comments

@nathfn
Copy link

nathfn commented Jun 13, 2018

Currently the solution compares elements by using the attribute "id" like this:

if (elInput.attr('id') == elSelect.attr('id')) {

In many cases my elements do not have an ID attribute. I fixed this by comparing the actual DOM elements instead like this:

if (elInput.get(0) === elSelect.get(0)) {

This fixed the entire tab order for me in solutions where the ID attribute was not in use.

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

1 participant