First text field loses focus on iPhone using Phonegap and jQuery Mobile
This开发者_JAVA技巧 is a problem specific to iPhone/iOS when using Phonegap and jQuery mobile a4.1. The same code works fine on Android 2.1.
I am dynamically adding a group of input fields to a jQuery mobile page, using $.html().
The first input field that the user taps on will bring up the keyboard and a caret starts flashing. But as soon as any keys are pressed the field appears to lose it's focus, and the value is not modified, though no blur event is fired and the keyboard remains.
If the user then focuses on a different field text can be added as normal.
I've not found much info about this on the internet, just a few old threads from 2008 which imply that there is (or was) a bug in webkit.
Any workaround ideas would be hugely appreciated.
Thanks
I just met this problem, I found putting attribute "placeholder" can avoid this issue. I believe it is bug in webkit.
This is a known issue. There are some work arounds on github for the issue.
Update: Changing to rc1 has fixed the problem for me, make sure you have the latest version of everything and give more info if that doesn't help.
精彩评论