Skip to content
This repository was archived by the owner on May 29, 2019. It is now read-only.

Commit da95122

Browse files
bekospkozlowski-opensource
authored andcommitted
fix(modal): prevent default event when closing via escape key
Fixes #1692 Closes #2087
1 parent 96def3d commit da95122

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

src/modal/modal.js

+1
Original file line numberDiff line numberDiff line change
@@ -201,6 +201,7 @@ angular.module('ui.bootstrap.modal', ['ui.bootstrap.transition'])
201201
if (evt.which === 27) {
202202
modal = openedWindows.top();
203203
if (modal && modal.value.keyboard) {
204+
evt.preventDefault();
204205
$rootScope.$apply(function () {
205206
$modalStack.dismiss(modal.key, 'escape key press');
206207
});

0 commit comments

Comments
 (0)