question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Select2 elements loses focus on tab. It should focus on next (select2) element.

See original GitHub issue

Go to https://adminlte.io/themes/AdminLTE/pages/forms/advanced.html. Try focusing on a select2 element, then press tab. You will see that the focus is not on the next input element.

I am not sure if the problem is with select2 itself or usage of it in admin-lte. It seems that select2 is not keyboard friendly. I found other select plugin selectize, which is more keyboard friendly.

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Comments:7

github_iconTop GitHub Comments

3reactions
lenamtlcommented, Jul 15, 2017

This is a Select2 issue there is a fix for this. $('select').on("select2:close", function () { $(this).focus(); });

Read more comments on GitHub >

github_iconTop Results From Across the Web

Select2 open dropdown on focus - Stack Overflow
So the first time the element get the focus, the select2 is opened for one time (because of one), when the element is...
Read more >
Common problems - The jQuery replacement for select boxes
This issue occurs because Bootstrap modals tend to steal focus from other elements outside of the modal. Since by default, Select2 attaches the...
Read more >
Search being unfocused - Is this a bug? - Select2
Hello, we are currently in the process of migrating from Select2 3.5 to 4.X, and noticed, that the search input loses focus straight...
Read more >
Multiple Select Element loses focus after first select - Select2
After selecting the first element in a multiple select, it becomes unfocused – not even the next field. returns back to the select...
Read more >
Tabbing without breaking order when opening - Select2
The reason you're seeing this behavior is that you are forcing the Select2 open when focus is on the Select2. Select2 returns focus...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found