             toControlEl = toTargetEl.closest('.xforms-control')
             sameControl = controlEl.is(toControlEl)
             if ! sameControl
-                controlEl.tooltip('hide')
-                @_tooltipShownForEl = null
+                @_callMethods(controlEl, 'hide')
+                @_tooltipPopoverShownForControlEl = null
+
+        _callMethods: (controlEl, arg) ->
+            methods = controlEl.data(@Methods)
+            _.each methods, (method) -> controlEl[method].call(controlEl, arg)


    $('.fr-body').on 'mouseenter mouseleave focusin focusout', '.xforms-control', (event) ->
        controlEl = $(event.target).closest('.xforms-control')
        tooltipEl = controlEl.find('.xforms-appearance-tooltip')
        controlHasTooltip = tooltipEl.is('*')
        if controlHasTooltip
            Tooltip.init(controlEl, tooltipEl)
            if ! tooltipShownBecauseOfFocus
                if event.type == 'mouseenter' then Tooltip.show(controlEl)
                if event.type == 'mouseleave' then Tooltip.hide(controlEl, event)
            if event.type == 'focusin'
                Tooltip.show(controlEl)
                tooltipShownBecauseOfFocus = true
            if event.type == 'focusout'
                Tooltip.hide(controlEl, event)
                tooltipShownBecauseOfFocus = false

    # Facade for Bootstrap's show/hide
    # - ensures we don't show an already visible tooltip, which would make it "blink"
    Tooltip =
        _tooltipShownForEl: null

        # Create the underlying Bootstrap tooltip (but don't show it just yet)
        init: (controlEl, tooltipEl) ->
            tooltipAlreadyInitialized = controlEl.data('xforms-tooltip-initialized') == 'true'
            if ! tooltipAlreadyInitialized
                controlEl.tooltip
                    placement: 'bottom',
                    trigger: 'manual',
                    title: tooltipEl.text()
                controlEl.data('xforms-tooltip-initialized', 'true')

        # Show tooltip for control
        # - but don't show if the tooltip is alrady shown for this control
        show: (controlEl) ->
            sameControl = controlEl.is(@_tooltipShownForEl)
            if ! sameControl
                @_tooltipShownForEl.tooltip('hide') if @_tooltipShownForEl?
                controlEl.tooltip('show')
                @_tooltipShownForEl = controlEl

        # Hide tooltip for control
        # - but don't hide if the element we're going to (if any) is the same as the current one

    # - LHHA shown as tooltip have the xforms-appearance-tooltip class
    _.each $('.fr-body .xforms-control'), (control) ->
        control = $(control)
        selectorAppearance = _.pairs
            '.xforms-hint': 'xforms-appearance-tooltip'
            '.xforms-help': 'xforms-appearance-popover'
        _.each selectorAppearance, ([selector, appearance]) ->
            el = control.find(selector)
            el.addClass('xforms-hidden')
            el.addClass(appearance)

    # Keep track of whether a tooltip is shown and this is because a control got the focus
    # - used to diactivate hiding/showing tooltip based on mouse movements
