You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on May 29, 2019. It is now read-only.
Recently-added code to auto focus the first focusable element in a modal does not work correctly when the modal includes other directives.
For example, we have a search-field directive which includes a text input and a button. This directive is used inside the modal-body. Yet when this code is triggered:
The array from loadFocusElementList does not include our search field input. In our case, wrapping the above line in a $timeout solves our issue, because our directive has compiled correctly by the next event cycle.
Link to minimally-working plunker that reproduces the issue:
The text was updated successfully, but these errors were encountered:
viveleroi
changed the title
focusFirstFocusableElement fails in modals including directives
focusFirstFocusableElement misses elements in modals including directives
Oct 14, 2016
Bug description:
Recently-added code to auto focus the first focusable element in a modal does not work correctly when the modal includes other directives.
For example, we have a
search-field
directive which includes a text input and a button. This directive is used inside the modal-body. Yet when this code is triggered:$modalStack.focusFirstFocusableElement($modalStack.loadFocusElementList(modalWindow));
The array from
loadFocusElementList
does not include our search field input. In our case, wrapping the above line in a$timeout
solves our issue, because our directive has compiled correctly by the next event cycle.Link to minimally-working plunker that reproduces the issue:
https://plnkr.co/edit/9LQxnCyQIQuJLvfvTjkw?p=preview
Version of Angular, UIBS, and Bootstrap
Angular: 1.5.8
UIBS: 2.2.0
Bootstrap: 3.3.7
The text was updated successfully, but these errors were encountered: