     if @state.active
       @resize()
       @addPortal()
+      @tooltipElement().qtip 'option', 'hide.event', false
 
       $(document).on "click.#{@uuid} keydown.#{@uuid}", @hide
       @props.onShow?()
+
     else
       @removePortal()
+      @tooltipElement().qtip 'option', 'hide.event', @tooltipHideEvent
+
       $(document).off "click.#{@uuid} keydown.#{@uuid}", @hide
       @props.onHide?()
 

    @portal.style.top = "#{Math.floor(top + $element.height() / 2)}px"
    @portal.style.left = "#{Math.floor(left + $element.width())}px"

    if @context?
      tooltipElement = $(@context).closest('.qtip')[0]
      @portal.style.zIndex = +tooltipElement.style.zIndex + 1




  toggle: =>
    @setState active: !@state.active


  tooltipElement: =>
    $(@context).closest('.qtip')


  addPortal: =>
