diff --git a/src/modal/modal.js b/src/modal/modal.js index 662765d357..72200d8924 100644 --- a/src/modal/modal.js +++ b/src/modal/modal.js @@ -91,6 +91,11 @@ angular.module('ui.bootstrap.modal', ['ui.bootstrap.transition']) element.addClass(attrs.windowClass || ''); scope.size = attrs.size; + // moved from template to fix issue #2280 + element.on('click', function(evt) { + scope.close(evt); + }); + $timeout(function () { // trigger CSS transitions scope.animate = true; diff --git a/template/modal/window.html b/template/modal/window.html index 81ca197ebb..249f6f9080 100644 --- a/template/modal/window.html +++ b/template/modal/window.html @@ -1,3 +1,3 @@ -