Scroll view not scrolling back down when keyboard closes

Hello guys,   I've experienced another issue with Hybrid mobile apps.  The application I'm working on needs a hidden status bar, that is resolved.   The problem is with a keyboard. It works very well in scrolling up when the keyboard opens but when the keyboard is closed the application doesn't scroll back down (there is white space).  Closed keyboard: Does anyone experience this issue and is there any workaround for this (it seems to me as PhoneGap issue)?  Thanks. 
6 answers

Hi David, I created a new build recently and cannot reproduc your issue. Then this article came along and I think it's a known issue with xcode10 and/or the wkwebview engine on iOS12.

To debug your issue I would try to disable wkwebview and see what happens. You need to disable the wkwebview in the config,xml, i.e.

        <!-- Disable WKWebView on iOS 
        <feature name="CDVWKWebViewEngine">
            <param name="ios-package" value="CDVWKWebViewEngine" />

        <preference name="CordovaWebViewEngine" value="CDVWKWebViewEngine" />

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

        <plugin name="cordova-plugin-wkwebview-engine-nextgen" source="npm" spec="^1.1.0" />

Can you try disabling the wkwebview and let us know your fndings? 


Hi everyone,

Just wanted to share one more solution that might work for you but still let you use wkwebview. It uses the cordova-plugin-keyboard widget to change the way the webview is shrink/grown when showing and hiding the keyboard

Add this to your config.xml:

<plugin name="cordova-plugin-keyboard" source="npm" spec="1.2.0" />

And add this to your index.html file:

<script type="text/javascript">
   document.addEventListener("deviceready", function() {
   }, false);



I had this too. With recent builds of the hybrid app. Another app which has been built earlier does not have this issue. Seems related to iOS 12. I opened a ticket for it.



I was able to resolve the white space issue. But I’m seeing other issues.  With these changes if try to select the text box widget, it doesn’t get selected easily. Sometimes I have to tap the text box several times before I can select it. Did anyone come across this ?

I believe this is coming from PhoneGap upgrading to  iOS 12/xcode10. Is there a way to specify the iOS/XCode version in phonegap config.xml so that it builds using the older version ?




Hi guys, 

The following will also give you the correct (with wkwebview) behavior of the Keyboard (add to config.xml file): 
<plugin name="cordova-plugin-keyboard" source="npm" spec="1.2.0" />
            <preference name="KeyboardShrinksView" value="true" />
            <!-- Hide keyboard accessory bar (optionaly) --> 
            <preference name="HideKeyboardFormAccessoryBar" value="true" />


Did anybody file a ticket for this? It's a blocking issue and downgrading to UIWebview will only work for so long, since it's deprecated by apple. 

Mendix can fix this in cordova-plugin-wkwebview-engine-mx similar to how it's fixed here: 

If a ticket isn't filed I can do so