The text field that has focus by default will lose focus when the keyboard is used the first time and no characters appear. It's as if a keystroke has tabbed the cursor off somewhere else. Just prior to the first keystroke, the text field has visual focus and the carrot is blinking.
If you first click in a different text field, all is well. Characters are entered correctly. Likewise, if you click a different text field and come back to the first, typing works as well.
I was never able to find the root cause of this problem, but I didn't discover a workaround. I see the behavior in any text input field listed first in a form - no matter the specific type (email, password, etc.).
But when I insert a hidden input field first, the typing problem for the first real field works again!
I had the same issue in alpha 2 but I have recently been working with 3pre. I believe I tracked down the offending code late last night which I've identified below. All of my tests are passing today on various ios devices / versions. Take a look and let me know how this works for you.
/* on mobileinit, add classes to HTML element
and set handlers to update those on orientationchange and resize*/
Is the detectResolutionBreakpoints();in 3pre only? I cant find it in alpha2. I have tried the placeholder and hidden input suggestions and neither have worked. Any links to get the latest version after alpha 2?
I'm still having this issue in Alpha 4. It's a very strange one, and I have spent about 3 hours tonight playing with it. The weird thing is that it doesn't always manifest. Sometimes I have to refresh my page to make it happen. I tried a lot of different tweaks to try and put it to bed, but ultimately only deferring the detectResolutionBreakpoints() call until after my page loads (as mentioned above) works decisively.
I'm seeing the problem here, too with Alpha 4.1 on iOS 4.3.3. ASP.NET MVC webapp, and it's happening on the login screen whether I navigate there manually or because of some required logon redirect. It doesn't look like placeholder or the hidden input did anything to change the behavior. I have to click on Done and then go back in to the field to start typing.
On my iPhone4 (iOS 4.1) with JQM RC1 I don't see this problem. I tap into a field (textbox) and it receives the focus and the keyboard slides into view.
I do however have a problem with the 'required' and 'autofocus' attributes.
The 'autofocus' doesn't work properly on my iPhone4. When the DOM switches to my page (I have multiple pages in the one html document), the field is given the focus because the keyboard slides into view then it immediately slides back down again and the field does not have the focus.
Hi. I've got this bug, too - and it appears to be general problem of the iOS: we tried on a different iPhones / iPads, and we use not JQuery, but YUI. But the workaround with adding the placeholder attribute works.
Leave a comment on burkanov's reply
Change topic type
Link this topic
Provide the permalink of a topic that is related to this topic