On iOS 6.0 Safari, it is not possible to assign (hardware, on-screen) keyboard focus to an input element with JavaScript, except perhaps when the current script is running in response to a user action.
How do I detect whether it is possible to set keyboard focus via JavaScript? By checking user agent?
Feature detection may be impossible: element.focus()
strangely does set document.activeElement
to element
. However, it doesn't cause the on-screen keyboard to pop up, or - if connected - the hardware keyboard to gain focus.