   # and our selection restoration will fail
   _setNewSelectionState: ->
     selection = document.getSelection()
+    return if not @_selectionInScope(selection)
+    # @_setSelectionMarkers()
+
     return if @_checkSameSelection(selection)
-    return if not @_selectionInScope(selection)
-    @_lastSelection =
-      anchorNode: selection.anchorNode?.cloneNode(true)
-      anchorOffset: selection.anchorOffset
-      focusNode: selection.focusNode?.cloneNode(true)
-      focusOffset: selection.focusOffset
     try
       range = selection.getRangeAt(0)
     catch

  # object will mutate underneath us.
  _checkSameSelection: (selection) ->
    return true if not selection?
    return false if not @_lastSelection
    return false if not selection.anchorNode? or not selection.focusNode?
    anchorEqual = selection.anchorNode.isEqualNode @_lastSelection.anchorNode
    focusEqual = selection.focusNode.isEqualNode @_lastSelection.focusNode

    anchorOffsetEqual = selection.anchorOffset == @_lastSelection.anchorOffset
    focusOffsetEqual = selection.focusOffset == @_lastSelection.focusOffset
    if not anchorOffsetEqual and not focusOffsetEqual
      # This means the selection is the same, but just from the opposite
      # direction. We don't care in this case, so check the reciprocal as
      # well.
      anchorOffsetEqual = selection.anchorOffset == @_lastSelection.focusOffset
      focusOffsetEqual = selection.focusOffset == @_lastSelection.anchorOffset

    if (@_lastSelection? and
        anchorEqual and
        anchorOffsetEqual and
        focusEqual and
        focusOffsetEqual)
      return true
    else

    @_editableNode().focus() if @isMounted()

  _onInput: (event) ->
    @_editableNode().normalize()
    @_setNewSelectionState()
    html = @_unapplyHTMLDisplayFilters(@_editableNode().innerHTML)
    @props.onChange(target: value: html)
