屏幕键盘出现时保留页面布局(iOS / phonegap) [英] Retaining page layout when on-screen keyboard appears (iOS/phonegap)

查看:129
本文介绍了屏幕键盘出现时保留页面布局(iOS / phonegap)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我使用cordova和angularJS创建单页非原生iOS应用程序。每当屏幕上的iPad键盘出现时,div元素向上移动并压缩在一起,以弥补较小的观看屏幕大小。

I am creating a single page non-native iOS application using cordova and angularJS. Whenever the onscreen iPad keyboard appears, the div elements are moved up and squashed together to compensate for the smaller viewing screen size.

如何使所有div元素在键盘弹出时保持在原位,只切出键盘占用的屏幕底部,而不重新排列所有元素?

How would I go about making all the div elements stay in place when the keyboard pops up, just cutting out the bottom part of the screen which the keyboard takes up, without rearranging all the elements?

提前感谢。

推荐答案

您的config.xml:

You need to add this to your config.xml:

<preference name="KeyboardShrinksView" value="false" />

查看 this post 这是一个类似的问题。

Take a look at this post It is a similar issue.

这篇关于屏幕键盘出现时保留页面布局(iOS / phonegap)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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