diff --git a/src/modal/modal.js b/src/modal/modal.js index b3036a3d43..a1955a3c0b 100644 --- a/src/modal/modal.js +++ b/src/modal/modal.js @@ -93,8 +93,11 @@ angular.module('ui.bootstrap.modal', []) link: function (scope, element, attrs) { scope.windowClass = attrs.windowClass || ''; - //trigger CSS transitions + // focus a freshly-opened modal + element[0].focus(); + $timeout(function () { + // trigger CSS transitions scope.animate = true; }); } diff --git a/template/modal/window.html b/template/modal/window.html index 3714dd61e6..3e83b0bddc 100644 --- a/template/modal/window.html +++ b/template/modal/window.html @@ -1 +1 @@ -
\ No newline at end of file + \ No newline at end of file