             @selectNextResult(-1)
 
     @input.on "click", (event) =>
+      @maybeFixSquishedCaret()
       # When the user clicks into the editor, check if they have clicked on a partial token to be completed.
       @checkAutocomplete()
 
     @input.on "blur", (event) =>
+      @input.children().removeClass('squish-selected')
       # When the user clicks out of the editor, wait a tick to get the active item- if they did not click on the
       # autocomplete menu, close it.
       setTimeout( =>

    range.collapse(true)
    range

  getWord: ->
    # Determine the length of text in the input.
    range = @getRange()

  registerEvents: ->
    @input.on "keyup", =>

      @maybeFixSquishedCaret()
      clearTimeout(@typingTimer) unless @typingTimer is null
      @typingTimer = setTimeout( =>
        # Store selected range (used to recover position when autocomplete menu is clicked).
