iPhone键盘在phonegap推上页 [英] iPhone keyboard pushes page up in phonegap
问题描述
我正在开发一个iOS应用程序在phonegap / cordova 3.3.0与jquery mobile 1.4.2
我设计了一个具有多个文本框的输入,但当iPhone本地键盘打开它推动页面向上在iphone 4,在iphone 5也是我面对同样的问题,但页面关闭键盘后,到达原始状态,但在iPhone 4页面在顶部被按在位置。检查下面的屏幕截图。
这是屏幕
这是当键盘打开
关闭键盘后关闭
请帮助...
现在您可以添加:
document.body.scrollTop = 0;
每当输入字段触发模糊事件时。
礼貌:链接
I am developing an iOS app in phonegap / cordova 3.3.0 with jquery mobile 1.4.2
I have designed a page with multiple textboxes for input but when iPhones native keyboard opens it pushes page up in iphone 4, in an iphone 5 also i face same issue but page comes to original state after closing keyboard, but in iphone 4 page stucks at the top in pushed position. Check screen shots below.
this is screen
this is when keyboard open
after closing keyboard is closed
please help...
For now you can add a:
document.body.scrollTop = 0;
whenever the input field fires a blur event.
courtesy: link
这篇关于iPhone键盘在phonegap推上页的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!