     selectionLeft = selectionBox.left + $(window).scrollLeft()
 
     left = selectionLeft + selectionBox.width
+    left = Math.min left, $(window).width() - @frame.$el.outerWidth()
 
     @_showAtCoordinates top, left
 

    super
    $(document).off 'mousemove', @_onMouseLeave

  _onMouseLeave: =>
    @_removeClass 'fl-button-state-hovered'
    @_callbacks.mouseleave()


  placeNearElement: (el) ->
    @$nearEl = $(el)
    @_fadeIn()
    @_updatePosition()

    $(window).on 'resize', => @_updatePosition()
    setInterval (=> @_updatePosition()), 1000
