             $(document).on 'click', @_click
         else
             @_mousedown = (e) =>
-                t = $(e.target)
-                if t.hasParent(@element).length > 0
+                if $(e.target).hasParent(@element).length > 0
                     @focus()
                 else
                     @blur()

        if not IS_MOBILE
            @textarea.on 'blur', =>
                if @_focusing?          # see comment in @focus.
                    delete @_focusing
                    @textarea.focus()   # steal it back.
                else
                    @blur()



        e = @element.find(".salvus-console-terminal")

        e.mousedown () =>
            @pause_rendering(false)

        e.mouseup () =>
            if not getSelection().toString()
