             event.preventDefault()
             event.stopPropagation()
             checkClose()
-
-        $el.keydown (event) ->
-            event.stopPropagation()
-            code = if event.keyCode then event.keyCode else event.which
-            if code == 27
-                checkClose()
 
         $el.on "click", ".status-dropdown", (event) ->
             event.preventDefault()


        checkClose = () ->
            if !$scope.obj.isModified()
                lightboxService.close($el)
                $scope.$apply ->
                    $scope.obj.revert()
            else
                $confirm.ask(
                    $translate.instant("LIGHTBOX.CREATE_EDIT.CONFIRM_CLOSE")).then (result) ->
                        result.finish()
                        lightboxService.close($el)

        $el.on "submit", "form", submit


            setStatus($scope.obj.status)
            render()
            $scope.lightboxOpen = true
            lightboxService.open($el, null, null, true)

        resetAttachments = () ->
            attachmentsToAdd = Immutable.List()
