after range.setStart new characters appear in previous node
问题 this happens in chrome (71.0.3578.80 on windows): on range.setStart the caret moves to the reference node, but after typing the new characters appear in the node before, when offset is 0. the expected behaviour would be, that the characters appear in the reference node of range.setStart. see here: http://jsfiddle.net/pgrds9qv/ function setCaret() { var el = document.getElementById("editable"); var range = document.createRange(); var sel = window.getSelection(); range.setStart(el.childNodes[2]