2017-09-25 104 views
0

我目前正在開發使用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.

繼續滾動會導致整個視圖,以顯示白色,除了在最底層提交按鈕。

然後我可以輕按背景/失去焦點,背景和投入將在加載回來。

感謝任何幫助!

回答

0

我認爲這是一個CSS問題,而不是一個cordova配置。每當鍵盤顯示時,iOS默認處理web視圖滾動。因此,如果您有任何額外的css來處理鍵盤顯示中的頁面滾動,請將其刪除。

+0

感謝您指出我的方向正確,我相信問題是由於計算滾動時正在進行的位置,當您打開鍵盤時不會發生這種情況。 –