From 6e04267b63d037df63dd2318df18e3b5983d38cd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jes=C3=BAs=20Espino?= Date: Tue, 19 Aug 2014 16:08:59 +0200 Subject: [PATCH] Fixed bug #722: Now is easier to close the lightbox --- app/coffee/modules/common/lightboxes.coffee | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/app/coffee/modules/common/lightboxes.coffee b/app/coffee/modules/common/lightboxes.coffee index ebc3093d..15f0f46f 100644 --- a/app/coffee/modules/common/lightboxes.coffee +++ b/app/coffee/modules/common/lightboxes.coffee @@ -31,6 +31,11 @@ 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