     @dom.el.on 'click', @dom.closeButtonSelector, (event) ->
       self.close()
 
+    @isFormElement = (element) ->
+      element.type || $(element).is('[contenteditable]')
     @createDimensions = ->
       new @options.dimensionsType(@overlayContent.find('.js-overlay-image'))
 

    @dom.mask.click (event) ->
      self.close()

    $(document).on 'keyup', (event) ->
      return unless event.which == 27
      self.close()

    @dom.el.on 'click', @dom.nextButtonSelector, (event) ->
      self.next()


  next: ->
    target = $(@selector)[@index + 1]
    return unless target
    @open(target)

  previous: ->
    target = $(@selector)[@index - 1]
    return unless target
    @open(target)

  setCommentPaneHeight: =>
