Cordova/Phonegap IOS键盘滚动问题,显示白色背景
问题描述:
我目前正在开发使用Phonegap Build。在IOS上,当键盘显示并且视图滚动以显示键盘当前在前面时,视图显示损坏。当用户丢失并且键盘关闭时,它是固定的。Cordova/Phonegap IOS键盘滚动问题,显示白色背景
这个问题在应用程序的所有页面上都是一致的,我花了相当多的时间研究,但是我找不到任何对这个特定问题的答案,任何和所有的帮助都不胜感激。
配置如下所示。 下面的图片试图展示我能做到的最好的问题。
<widget xmlns="http://www.w3.org/ns/widgets" xmlns:gap="http://phonegap.com/ns/1.0" id="current.id" version="1.0.2">
<name>Foobar</name>
<description>an application</description>
<content src="index.html"/>
<preference name="DisallowOverscroll" value="true"/>
<preference name="android-minSdkVersion" value="14"/>
<preference name="Fullscreen" value="flase" />
<preference name="StatusBarOverlaysWebView" value="true" />
<preference name="prerendered-icon" value="true" />
<preference name="permissions" value="none" />
<preference name="orientation" value="portrait" />
<gap:config-file platform="ios" parent="NSCameraUsageDescription" overwrite="true">
<string>We are using the Camera for the profile picture..</string>
</gap:config-file>
<gap:config-file platform="ios" parent="NSPhotoLibraryUsageDescription" overwrite="true">
<string>We are using the Camera for the profile picture..</string>
</gap:config-file>
<feature></feature>
<plugin name="cordova-custom-config" source="npm" spec="~4.0.2" />
<plugin name="cordova-plugin-battery-status" source="npm" spec="~1.1.1"/>
<plugin name="cordova-plugin-console" source="npm" spec="~1.0.2"/>
<plugin name="cordova-plugin-device" source="npm" spec="~1.1.1"/>
<plugin name="cordova-plugin-device-motion" source="npm" spec="~1.2.0"/>
<plugin name="cordova-plugin-device-orientation" source="npm" spec="~1.0.2"/>
<plugin name="cordova-plugin-dialogs" source="npm" spec="~1.2.0"/>
<plugin name="cordova-plugin-file" source="npm" spec="~4.1.1"/>
<plugin name="cordova-plugin-file-transfer" source="npm" spec="~1.5.0"/>
<plugin name="cordova-plugin-globalization" source="npm" spec="~1.0.3"/>
<plugin name="cordova-plugin-inappbrowser" source="npm" spec="~1.3.0"/>
<plugin name="cordova-plugin-splashscreen" source="npm" spec="~3.2.1"/>
<plugin name="cordova-plugin-statusbar" source="npm" spec="~2.1.2"/>
<plugin name="cordova-plugin-vibration" source="npm" spec="~2.1.0"/>
<plugin name="cordova-plugin-whitelist" source="npm" spec="~1.2.1"/>
<plugin name="cordova-plugin-camera" source="npm" spec="~2.1.1"/>
<plugin name="cordova-plugin-media-capture" source="npm" spec="~1.2.0"/>
<plugin name="cordova-plugin-media" source="npm" spec="~2.2.0"/>
步骤1:Image 1, Focus on the input.
步骤2:Image 2, Scrolling slightly down while still focused on the input.
继续滚动会导致整个视图,以显示白色,除了在最底层提交按钮。
然后我可以轻按背景/失去焦点,背景和投入将在加载回来。
感谢任何帮助!
答
我认为这是一个CSS问题,而不是一个cordova配置。每当键盘显示时,iOS默认处理web视图滚动。因此,如果您有任何额外的css来处理键盘显示中的页面滚动,请将其删除。
感谢您指出我的方向正确,我相信问题是由于计算滚动时正在进行的位置,当您打开键盘时不会发生这种情况。 –