     })
     uploadcare.openDialog(file, 'preview', settings).always ->
       currentDialogPr = oldDialogPr
+      # still opened
+      $('html, body').addClass(openedClass)
 
 
   # files - null, or File object, or array of File objects, or FileGroup object

    if ns.isDialogOpened()
      if e.which == 27  # Escape
        e.stopImmediatePropagation()
        currentDialogPr?.reject()

  currentDialogPr = null



  ns.openPreviewDialog = (file, settings) ->
    # hide current opened dialog and open new one
    oldDialogPr = currentDialogPr
    currentDialogPr = null
    settings = $.extend({}, settings, {
