             lightboxContent.show()
             defered.resolve()
 
-        docEl = angular.element(document)
-        docEl.on "keydown.lightbox", (e) =>
-            code = if e.keyCode then e.keyCode else e.which
-            if code == 27
-                if onEsc
-                    @rootScope.$applyAsync(onEsc)
-                else
-                    @.close($el)
+        if !ignoreEsc
+            docEl = angular.element(document)
+            docEl.on "keydown.lightbox", (e) =>
+                code = if e.keyCode then e.keyCode else e.which
+                if code == 27
+                    if onEsc
+                        @rootScope.$applyAsync(onEsc)
+                    else
+                        @.close($el)
 
 
         return defered.promise

                deleteAttachments(data).then () ->
                    createAttachments(data).then () ->
                        currentLoading.finish()
                        lightboxService.close($el)
                        $rs[schema.model].getByRef(data.project, data.ref, schema.params).then (obj) ->
                            $rootScope.$broadcast(broadcastEvent, obj)
            promise.then null, (data) ->

class LightboxService extends taiga.Service
    constructor: (@animationFrame, @q, @rootScope) ->

    open: ($el, onClose, onEsc, ignoreEsc) ->
        @.onClose = onClose

        if _.isString($el)
