     onClickReply: (e) => @replyTo(e.currentTarget)
 
     onClickReturn: (e) => @returnFrom(e.currentTarget)
+
+    onShowTip: (event, api) =>
+        event.preventDefault() if @annotationsHidden
 
     getSpanForProblemReturn: (el) ->
         problem_id = $(@problemReturnSelector).index(el)

        position:
            my: 'bottom center' # of tooltip
            at: 'top center' # of target
            target: 'mouse'
            container: @$(@wrapperSelector)
            adjust:
                mouse: false # dont follow the mouse
                y: -10
        show:
            event: 'click mouseenter'
            solo: true
        hide:
            event: 'click mouseleave'
            delay: 250,
            fixed: true
        style:
            classes: 'ui-tooltip-annotatable'
        events:
            show: @onShowTip
            visible: @onVisibleTip

    onShowTip: (event, api) =>
        event.preventDefault() if @annotationsHidden

    onVisibleTip: (event, api) =>
        @constrainTipHorizontally(api.elements.tooltip, event.originalEvent.pageX)

    onClickToggleAnnotations: (e) => @toggleAnnotations()


    spanSelector:               '.annotatable-span'
    replySelector:              '.annotatable-reply'

    # these selectors are for responding to events from the annotation capa problem type
    problemXModuleSelector:     '.xmodule_CapaModule'
    problemSelector:            'section.problem'
    problemInputSelector:       'section.problem .annotation-input'
