I'd like to select all in an input textbox or contenteditable span so the user doesn't have to backspace or delete an input text to overwrite.
It works on desktop but mobile web seems to ignore the select all. Is this possible on mobile web viewable on ios or android?
found the answer in this post Programmatically select text in a contenteditable HTML element?
$scope.focusWhy = function($event) { var el = $event.target; var range = document.createRange(); range.selectNodeContents(el); var sel = window.getSelection(); sel.removeAllRanges(); sel.addRange(range); };