       else
         @removed.push mutation.target
 
-  setTarget: (target) ->
-    return unless target.parentElement?
+  setTarget: (target, editor) ->
+    return unless target.parentElement? && target != editor
     if @target? && @target.compareDocumentPosition(target) & Node.DOCUMENT_POSITION_FOLLOWING
       @target = target
     else

    node1 = node1.cloneNode(true)
    node2 = node2.cloneNode(true)

    for el in node1.querySelectorAll('[contenteditable=false]')
      el.remove()

    for el in node2.querySelectorAll('[contenteditable=false]')
      el.remove()

    node1.nodeName == node2.nodeName &&
    node1.innerHTML.trim() == node2.innerHTML.trim()






  outdated: (observedMutations) =>
    @observer.hold =>
      mutations = new Mutations(observedMutations, @element())
      @updated(mutations)

    event = new CustomEvent('Editor:updated', {bubbles: true})
    @element().dispatchEvent(event)
