We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent ea053b1 commit 709e679Copy full SHA for 709e679
src/modal/modal.js
@@ -93,8 +93,11 @@ angular.module('ui.bootstrap.modal', [])
93
link: function (scope, element, attrs) {
94
scope.windowClass = attrs.windowClass || '';
95
96
- //trigger CSS transitions
+ // focus a freshly-opened modal
97
+ element[0].focus();
98
+
99
$timeout(function () {
100
+ // trigger CSS transitions
101
scope.animate = true;
102
});
103
}
template/modal/window.html
@@ -1 +1 @@
1
-<div class="modal fade {{ windowClass }}" ng-class="{in: animate}" ng-style="{'z-index': 1050 + index*10}" ng-transclude></div>
+<div tabindex="-1" class="modal fade {{ windowClass }}" ng-class="{in: animate}" ng-style="{'z-index': 1050 + index*10}" ng-transclude></div>
0 commit comments