Show keyboard automatically with focus() event in UIWebView using Trigger.IO/PhoneGap

旧时模样 提交于 2019-12-01 00:18:52
Connorhd

Access to the UIWebView isn't something we properly expose in the current version of plugins (but is something we will support soon). For now if you want to try it out you can add

extern UIWebView *webView;

to the top of your plugin file, which will make the variable webView available in your API methods. This will stop working very soon though so I recommend you only use this to test things out for now.

Update Oct 2012:

The app's web view is now exposed via ForgeApp: http://docs.trigger.io/en/v1.4/_static/native/ios/Classes/ForgeApp.html#//api/name/webView

E.g.:

[ForgeApp sharedApp].webView
Jonathan

As describec here, you can now add the property

KeyboardDisplayRequiresUserAction=NO;

to your Cordova.plist file and then just call

$(el).focus();
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!