select2 / select2-bootstrap-theme

A Select2 v4 Theme for Bootstrap 3
https://select2.github.io/select2-bootstrap-theme/
MIT License
872 stars 499 forks source link

Focus is lost for most scenarios when the dropdown list closes #61

Closed Vaccano closed 7 years ago

Vaccano commented 7 years ago

NOTE: This is a Chome and Firefox only bug. (IE 11 works fine)

Focus is lost when you do one of the following:

Basically when the dropdown list closes, focus is lost. Pressing tab moves the focus to the first item on the page.

Repro Steps:

  1. Load this URL: https://select2.github.io/examples.html
  2. Click on the second drop down on the page (or any that has Select2 applied)
  3. Select an option
  4. Press Tab RESULT: The Logo at the top of the screen is focused.

Tested on Chrome 56 and Firefox 38.5.1 using Windows 7 also tested with Chrome in my app using the latest build as of 3/10/2017.

UPDATE: This bug does not occur if you use the "minimumResultsForSearch: Infinity" option. But then you cannot type to match on items in the list.

fk commented 7 years ago

Hi @Vaccano!

This looks like an issue with Select2 itself, not with select2-bootstrap-theme. Please open an issue on the Select2 issue tracker after checking if your issue has not already been reported. Thank you!