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) ->