在 iOS 设备中出现键盘后,PhoneGap 页面向上滚动,导致 PhoneGap 页面损坏 [英] PhoneGap Page scroll up after Keyboard appearance in iOS devices that makes the PhoneGap page corrupted

查看:48
本文介绍了在 iOS 设备中出现键盘后,PhoneGap 页面向上滚动,导致 PhoneGap 页面损坏的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试使用 PhoneGap 为 iOS 设备开发聊天应用程序.该应用程序有一个显示登录用户的页眉、一个用户可以编写文本消息的页脚,以及一个放置在正文中的列表视图,用于显示消息.

我更新到最新版本的 JQueryMobile (1.3.0) 但问题仍然出现在应用程序中.我附上了一张快照,显示了布局如何损坏.(http://i.stack.imgur.com/RsLfT.png)>

我尝试了多种解决方案,例如使页面不可滚动(将 UIWebViewBounce 设置为 false)和不可扩展(user-scalable=no)以及其他用户界面更改,但问题并未解决.

有人知道如何解决这个问题吗?(就像软键盘出现后的刷新)

<小时>

解决方案

为了暂时解决这个问题(因为它在键盘显示时显示中断),您可以在配置文件中将KeyboardShrinksView"设置为true"(config.xml) 或添加它:

...<preference name="KeyboardShrinksView" value="true"/><插件>...

I am trying to develop a chatting application using PhoneGap for iOS devices. The application has a header that shows the logged user, a footer where user can write his text message, and a list view placed in the body which will display messages.

I updated to the latest version of JQueryMobile (1.3.0) but the issue still appearing inside the application. I have attached a snapshot shows how the layout becomes corrupted. (http://i.stack.imgur.com/RsLfT.png)

I tried several solutions like making the page not scrollable (set UIWebViewBounce to false) and not scalable (user-scalable=no) and other user interface changes, but the issue is not solved.

Does anyone have an idea how to fix this? (like a refresh after soft keyboard appearance)


解决方案

In order to fix this Issue temporarily (because it shows breaks while keyboard is showing), you can set "KeyboardShrinksView" to "true" in your configuration file (config.xml) or add it:

<widget>
  ...
  <preference name="KeyboardShrinksView" value="true" />

  <plugins>...

这篇关于在 iOS 设备中出现键盘后,PhoneGap 页面向上滚动,导致 PhoneGap 页面损坏的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆