Programmatically selecting text in an input field on iOS devices (mobile Safari)
input.setSelectionRange(0, 9999);
https://developer.mozilla.org/en/DOM/Input.select
Nothing in this thread worked for me, here's what works on my iPad:
// t is the input field
setTimeout(function() {
t.setSelectionRange(0, 9999);
}, 1);