Revert "Revert "Fix #795: Close lightbox only if buttons, ESC key or the X icon is pressed""
This reverts commit a367787f26
.
stable
parent
de82b6b6d2
commit
ad89b8f39d
|
@ -31,11 +31,6 @@ class LightboxService extends taiga.Service
|
||||||
lightbox.addClass('open')
|
lightbox.addClass('open')
|
||||||
), 70
|
), 70
|
||||||
|
|
||||||
lightbox.on 'click', (e) =>
|
|
||||||
target = angular.element(e.target)
|
|
||||||
if target[0] == lightbox[0]
|
|
||||||
@close(lightbox)
|
|
||||||
|
|
||||||
$(document)
|
$(document)
|
||||||
.on 'keydown.lightbox', (e) =>
|
.on 'keydown.lightbox', (e) =>
|
||||||
code = if e.keyCode then e.keyCode else e.which
|
code = if e.keyCode then e.keyCode else e.which
|
||||||
|
@ -52,6 +47,7 @@ class LightboxService extends taiga.Service
|
||||||
|
|
||||||
module.service("lightboxService", LightboxService)
|
module.service("lightboxService", LightboxService)
|
||||||
|
|
||||||
|
|
||||||
LightboxDirective = (lightboxService) ->
|
LightboxDirective = (lightboxService) ->
|
||||||
link = ($scope, $el, $attrs) ->
|
link = ($scope, $el, $attrs) ->
|
||||||
$el.on "click", ".close", (event) ->
|
$el.on "click", ".close", (event) ->
|
||||||
|
|
Loading…
Reference in New Issue