I am trying to use select2 inside bootstrap modal, but it does not get focus automatically, and the down and up arrows do not work for a populated list.
The same select2 works when I put it outside a modal popup.
When I searched, I found that many are facing the same problem and found this message
Select2 does not work if it is built into the boot mod
I implemented both solutions from it
- Removed
tabindex from a modal popup. - The commented code for the
enforceFocus function in the enforceFocus file.
But it still does not work! Any idea what I can still skip?
Edit1
Works on firefox when tabindex is removed from a modal div, but not with IE9
Edit2
I found that tabindex removal is not actually recognized by IE9 because I can still hide the popup using the escape key in IE, but not in Firefox.
jquery-select2
Pawan nogariya
source share