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

Created on 27 Jun 2017  路  7Comments  路  Source: ColorlibHQ/AdminLTE

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.

Most helpful comment

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

All 7 comments

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

The other problem with the Tab is if you do a search then click tab the input will not have the new value, you have to click on Enter... I have to find a solution for this

@lenamtl, how do I get the fix??

You can manually edit the file since the pull request is not done yet...
I have not test it yet.
So make a backup first then do some tests

I think this problem is still present

Was this page helpful?
0 / 5 - 0 ratings

Related issues

acacha picture acacha  路  4Comments

jrandhawa09 picture jrandhawa09  路  3Comments

fromberg100 picture fromberg100  路  4Comments

EliuTimana picture EliuTimana  路  4Comments

akbajwaakgec picture akbajwaakgec  路  3Comments