From ad89b8f39ded9a85f9401d3d6a9e99839aaddc63 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?David=20Barrag=C3=A1n=20Merino?= Date: Tue, 2 Sep 2014 11:18:35 +0200 Subject: [PATCH] Revert "Revert "Fix #795: Close lightbox only if buttons, ESC key or the X icon is pressed"" This reverts commit a367787f26d2fd152b28fd2934dd1950bb2ca4eb. --- app/coffee/modules/common/lightboxes.coffee | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/app/coffee/modules/common/lightboxes.coffee b/app/coffee/modules/common/lightboxes.coffee index 10db775f..c5c2079d 100644 --- a/app/coffee/modules/common/lightboxes.coffee +++ b/app/coffee/modules/common/lightboxes.coffee @@ -31,11 +31,6 @@ class LightboxService extends taiga.Service lightbox.addClass('open') ), 70 - lightbox.on 'click', (e) => - target = angular.element(e.target) - if target[0] == lightbox[0] - @close(lightbox) - $(document) .on 'keydown.lightbox', (e) => code = if e.keyCode then e.keyCode else e.which @@ -52,6 +47,7 @@ class LightboxService extends taiga.Service module.service("lightboxService", LightboxService) + LightboxDirective = (lightboxService) -> link = ($scope, $el, $attrs) -> $el.on "click", ".close", (event) ->