[ACCEPTED]-How can you autofocus on a form field in iPhone Safari?-mobile-safari
Accepted answer
According to this page, autofocus is not supported 1 in iphone/ipad for usability reasons.
Try to give the input element a type
<input type="email" id="element" autofocus/>
and 1 for fallback you can use
<script type="text/javascript">
if (!("autofocus" in document.createElement("input"))) {
document.getElementById("element").focus();
}
</script>
Source:
stackoverflow.com
More Related questions
Cookie Warning
We use cookies to improve the performance of the site. By staying on our site, you agree to the terms of use of cookies.