I am trying to on page load have the first form field to be automatically selected/in focus by using the focus() method in jQuery. This works fine on the deskop - however this doesn't appear to work on iOS in the Safari browser - can anyone suggest why not?
var el = $('#txtNewUsername').get(0);
var elemLen = el.value.length;
el.selectionStart = elemLen;
el.selectionEnd = elemLen;
el.focus();