From 722036c77c0d3e746be9f18f1c41df49ab70f327 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jon=20I=C3=B1iguez=20de=20Heredia?= Date: Tue, 2 Dec 2014 23:41:17 +0100 Subject: [PATCH] Moved click event from template to directive code --- src/modal/modal.js | 5 +++++ template/modal/window.html | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) 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 @@ -