3

I'm looking for a way to automatically bring up the iPod/iPhone keyboard to enter data into a form element when the page loads. I'm using jQuery. For some reason selecting the element in the document.ready() event handler and using the focus() event does not trigger the keyboard to come up. $("#myInput").click() doesn't work either. Any help?

Thanks!

Troy
  • 51
  • 7
  • there seems to be lots of this question on stack overflow. none of which gives a suitable answer. most cite `$("#input").focus();` or `$("#input").select();` but ive tried these just now on mobile safari and neither work. - im gonna keep looking and checking back here cus i'd also like to know how this can be achived – Christopher Apr 02 '11 at 19:36
  • I've updated my answer below. – Labu Mar 04 '14 at 11:48

1 Answers1

-1

Originally:

This is not possible, have a look here and here.

Edit, because this feature is now implemented in a newer version of iOS:

From the first link above, Matt states that:

As of iOS 5, handlers triggered by synthesised click events are allowed to trigger focus on input elements. Try the updated FastClick input focus example.

Community
  • 1
  • 1
Labu
  • 2,572
  • 30
  • 34
  • The (current as of this comment) -1 down-vote was for the original answer. I've updated the answer with a solution in hopes that if someone find this, it will actually help. – Labu Mar 04 '14 at 11:47