       return el if window.getComputedStyle(el).display == 'block'
     console.error 'FactlinkJailRoot: No text container found for ', el
 
-  _updatePosition: ->
+  _updatePosition: =>
     top = @$nearEl.offset().top + @$nearEl.outerHeight()/2 - @frame.$el.outerHeight()/2
 
     textContainer = @_textContainer(@$nearEl[0])

    current_user_opinion = $(event.target).data('opinion')
    FactlinkJailRoot.createFactFromSelection(current_user_opinion)

  _updatePosition: ->

  placeNearSelection: (mouseX=null) ->
    return if @_visible


      left: left + "px"
      top: top + "px"

  _updatePositionRegularly: ->
    $(window).on 'resize', @_updatePosition
    @_interval = setInterval @_updatePosition, 1000
    @_updatePosition()

  _updatePosition: =>

  hide: =>
    @frame.fadeOut()
    @_visible = false
