11 Sep 2014 5:12 AM #1
[Cordova] Problem keyboard with input focus
I have a problem when I call an auto-focus in an input field..
I see the focus on the input but the keyboard doesn't show .. If I tap on the input, I have the focus & the keyboard ..
How can I solve this ?
Thanks all !
13 Sep 2014 4:19 AM #2
Cordova comes with a config for this; Just add it to the config.xml file at the root of the Touch project and you should be good to go:
<preference name="KeyboardDisplayRequiresUserAction" value="false" />
14 Sep 2014 1:11 AM #3
- Join Date
- Mar 2007
- Gainesville, FL
- Vote Rating
Nice find!Mitchell Simoens @LikelyMitch
Sencha Inc, Senior Software Engineer
Check out my GitHub, lots of nice things for Ext JS 4 and Sencha Touch 2
Think my support is good? Get more personalized support via a support subscription. https://www.sencha.com/store/
Need more help with your app? Hire Sencha Services email@example.com
Want to learn Sencha Touch 2? Check out Sencha Touch in Action that is in print!
When posting code, please use BBCode's CODE tags.
14 Sep 2014 10:45 PM #4
Hello, Thx for the answer but it doesn't work on Android 4.2 & 4.4 I have find & try this solution before post here .. I saw this solution that is only for iOs. An other idea ?
15 Sep 2014 6:46 AM #5
Haven't tested it, but here's a cordova keyboard plugin with a show method:
Make sure to uninstall any other keyboard plugins so they don't interfere.
15 Sep 2014 6:53 AM #6
I try it too, but this softkeyboard is not for special input (tel,num,url,email ..) ... isn't it ?
7 Oct 2014 7:14 AM #7
Cordova comes with a config for this; Just add it to the config.xml file at the root of the Touch project and you should be good to go:Code:
For non-built apps, it works as well if field#focus() is called within the handler that creates the form. I believe it runs off of a timer (e.g., < 800ms) since last interaction by the user to determine if your request will be respected - but I may be mistaken. Either way it works this is really effective