Skip to content

Commit

Permalink
fix(modal): prevent default event when closing via escape key
Browse files Browse the repository at this point in the history
  • Loading branch information
bekos committed Apr 19, 2014
1 parent 96def3d commit caea01d
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/modal/modal.js
Original file line number Diff line number Diff line change
Expand Up @@ -201,6 +201,7 @@ angular.module('ui.bootstrap.modal', ['ui.bootstrap.transition'])
if (evt.which === 27) {
modal = openedWindows.top();
if (modal && modal.value.keyboard) {
evt.preventDefault();
$rootScope.$apply(function () {
$modalStack.dismiss(modal.key, 'escape key press');
});
Expand Down

0 comments on commit caea01d

Please sign in to comment.