Cordova/Phonegap IOS 键盘滚动问题,显示为白色背景
Cordova/Phonegap IOS keyboard scroll issue, White background shown
我目前正在使用 Phonegap Build 进行开发。在 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 视图滚动 up.So 如果您有任何额外的 css 来处理键盘显示上的页面滚动,请将其删除。
我目前正在使用 Phonegap Build 进行开发。在 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 视图滚动 up.So 如果您有任何额外的 css 来处理键盘显示上的页面滚动,请将其删除。