Move cursor after last element with Javascript

_moveCursor(){ let range = document.createRange(); let lastSpan = this._getLastSpan(); range.setStartAfter(lastSpan); range.collapse(true); let selection = window.getSelection(); selection.removeAllRanges(); selection.addRange(range); }

Props to: stackoverflow.com/a/15814297/4415951

Schreibe einen Kommentar