iOS 7输入元素移动固定定位元素 [英] iOS 7 input elements moving fixed positioned elements

查看:100
本文介绍了iOS 7输入元素移动固定定位元素的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试重新编译适用于iOS 7的应用程序,因为到目前为止,旧的应用程序都没有。
许多问题之一是我在UIWebViews中使用了一些输入。文本输入,拣货员等。

I'm trying to recompile an app for iOS 7, since nothing of the old one works so far. One of the many problems is that I'm using some inputs inside UIWebViews. Text inputs, pickers etc.

现在,当iOS 7闪亮的白色键盘出现时,网页中所有底部固定元素(例如,确认按钮)都向上滚动,好像虚拟键盘的顶部是我的UIWebView的新底部。这是与iOS6.x完全不同的行为

Now, when the iOS 7 shining white keyboard appears, all the bottom fixed elements in the webpage (such as, confirm buttons) are scrolled upward, as if the 'top' of the virtual keyboard is the new bottom of my UIWebView. This is a substantially different behavior from iOS6.x

是否有任何魔术技巧可以使虚拟键盘行为像以前一样工作,而无需将JS / CSS注入webView ?

Is there any magic trick to make the virtual keyboard behavior work like it used to, without injecting JS/CSS to the webView?

推荐答案

这解决了我的cordova应用程序的问题。我不确定它是否适用于你,但以防万一。

This fixed the problem for my cordova app. I'm not sure if it applies to you but just in case.

检查你的html meta标签是这样的:

Check your html meta tags for something like this:

<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0, user-scalable=0">

将其替换为:

<meta name="viewport" content="width=device-width, height=device-height, initial-scale=1.0, maximum-scale=1.0, target-densityDpi=device-dpi" />

这篇关于iOS 7输入元素移动固定定位元素的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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