       div.appendChild(node)
       node = nextSibling
 
-  deleteAt: (startIndex, length) ->  
+  deleteAt: (startIndex, length) ->
+    oldIgnoreDomChange = @ignoreDomChanges
     @ignoreDomChanges = true
     range = if _.isNumber(startIndex) then new Tandem.Range(this, startIndex, startIndex + length) else startIndex
     this.preserveSelection(range.start, 0 - length, =>

    setInterval(checkSelectionChange, this.options.POLL_INTERVAL)

  insertAt: (startIndex, text, attributes = {}) ->
    @ignoreDomChanges = true
    range = if _.isNumber(startIndex) then new Tandem.Range(this, startIndex, startIndex) else startIndex
    this.preserveSelection(range.start, text.length, =>

        range = null
      )
    )
    @ignoreDomChanges = oldIgnoreDomChange

  insertNewlineAt: (startIndex) ->
    range = new Tandem.Range(this, startIndex, startIndex)
