Fixed bug in dom.js
Fixed caret position bug in _insertNode
type