spec/helpers/util.js
function placeCaret(el, position) {
    var range, sel;

    range = document.createRange();
    sel = window.getSelection();
    range.setStart(el.childNodes[0], position);
    range.collapse(true);
    sel.removeAllRanges();
    sel.addRange(range);
}
function placeCaret(el, position) {
    var range, sel;

    range = document.createRange();
    sel = window.getSelection();
    range.setStart(el.childNodes[0], position);
    range.collapse(true);
    sel.removeAllRanges();
    sel.addRange(range);
}
function placeCaret ( el , position ) { var range , sel ; range = document . createRange ( ) ; sel = window . getSelection ( ) ; range . setStart ( el . childNodes [ 0 ] , position ) ; range . collapse ( true ) ; sel . removeAllRanges ( ) ; sel . addRange ( range ) ; }
Placing caret to element and selected position

@param {Element} el
@param {integer} position
@return {void}
Placing caret to element and selected position