From caea01d7fa96eaade4c98988f5cf0078175b3c8f Mon Sep 17 00:00:00 2001 From: Tasos Bekos Date: Sat, 19 Apr 2014 22:32:29 +0300 Subject: [PATCH] fix(modal): prevent default event when closing via escape key Fixes #1692 --- src/modal/modal.js | 1 + 1 file changed, 1 insertion(+) diff --git a/src/modal/modal.js b/src/modal/modal.js index 6809c41825..bf8de5374b 100644 --- a/src/modal/modal.js +++ b/src/modal/modal.js @@ -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'); });