   # deleteByDrag: (event) ->
 
   deleteCompositionText: (event) ->
-    @composition = ""
+    @responder?.deleteInDirection("backward")
 
   # deleteContent: (event) ->
 
   deleteContentBackward: (event) ->
-    {length} = getTargetText(event)
     @delegate?.inputControllerWillPerformTyping()
-    @responder?.deleteInDirection("backward", {length})
+    @responder?.deleteInDirection("backward")
 
   # deleteContentForward: (event) ->
   #

  # deleteSoftLineForward: (event) ->

  deleteWordBackward: (event) ->
    {length} = getTargetText(event)
    @delegate?.inputControllerWillPerformTyping()
    @responder?.deleteInDirection("backward", {length})

  deleteWordForward: (event) ->
    {length} = getTargetText(event)
    @delegate?.inputControllerWillPerformTyping()
    @responder?.deleteInDirection("forward", {length})

  # formatBackColor: (event) ->


    expected

  mutationIsSignificant: ->
    not @composing

  events:
    beforeinput: (event) ->
      @handledInput = false
      if @[event.inputType]
        @handledInput = true
        updateSelectionForEvent(event)
        @[event.inputType](event)
        @requestRender() if event.defaultPrevented

    input: (event) ->
      updateSelectionForEvent(event)

    compositionend: (event) ->
      @composing = false

  # https://www.w3.org/TR/input-events-2/#interface-InputEvent-Attributes

