             @addItem(@resultList.find("li").first())
 
         when 8 # Backspace
+          @range = @getRange()
+          parent = @range.commonAncestorContainer.parentElement
+          if !parent.classList.contains('token-text-area-input')
+            lastChild = @input.children().last()
+            if @input.text().substr(@input.text().length - lastChild.text().length) == lastChild.text()# && !(@input.html().substr(-6) == '&nbsp;')
+              @kill(event)
+              lastChild.remove()
           if @options.operators
-            @range = @getRange()
-            parent = @range.commonAncestorContainer.parentElement
             if parent.classList.contains('operator')
               parent.parentNode.removeChild(parent)
 

            @selectNextResult(-1)

    @input.on "click", (event) =>
      # When the user clicks into the editor, check if they have clicked on a partial token to be completed.
      @checkAutocomplete()

    @input.on "blur", (event) =>
      # 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( =>

  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).
