Autofocus is not working in modals
Bug description:
Autofocus is not working in modals. The problem appeared in version 2.2.0, and is missing in 2.1.3.
Link to minimally-working plunker that reproduces the issue:
https://plnkr.co/edit/lnaWCwMQoD0qamWyEhD2?p=preview
Version of Angular, UIBS, and Bootstrap
Angular: 1.5.8 UIBS: 2.2.0 Bootstrap: 3.3.7
Can confirm--I had the same problem with 2.2.0. Changed to 2.1.3 and autofocus now works.
Same here.
Sorry - just a clarification... I went back to 2.1.4 (not 2.1.3) from 2.2.0 to resolve the issue.
I have noticed and issue which probably relatives to this. But notice in 2.2.0 the modal automatically focuses on the first tab-able element. This did not occur in 2.1.4.
Seems that the focus goes to the close button (which probably is the first tab-able element). Perhaps this was related to the change to make the dialogs more accessible? See the change on https://github.com/angular-ui/bootstrap/commit/f9f7e02 - src/modal/modal.js line 649 (newly added).
It appears this was fixed in #6295
Fixed in 2.3.1