ionic-team / ionic-plugin-keyboard

Ionic Keyboard Plugin for Cordova
Apache License 2.0
611 stars 278 forks source link

When app running in background with keyboard open then it shows some white gap #283

Open mobileias opened 7 years ago

mobileias commented 7 years ago

Hello

we are using ionic 1.2.4 and creating build using phonegap website.

<preference name="phonegap-version" value="cli-6.5.0" />

we used ionic keyboard plugin with below config.

<preference name="KeyboardDisplayRequiresUserAction" value="false"/> <plugin name="ionic-plugin-keyboard" source="npm" version="2.2.1" /> <feature name="Keyboard"> <param name="ios-package" value="IonicKeyboard" onload="true" /> </feature>

Now all is fine in android but in ios when we put app in background with keyboard open then after 2-3 min when we see app running in background then it shows like below.

http://prntscr.com/folhwa ios-issue

So possible to give any idea why this type behavior occur in only ios.

After we open app from background it hide that white gap and fine but when we see app in background that time only it shows gap.

Regards

thorizer commented 6 years ago

not ios only. in android too.

hirbod commented 6 years ago

I experienced this too. Looks like the body/native shrink fires even when the app is in background. I opened my app, closed to background, opened WhatsApp, and as soon as the keyboard is open, you can see in multitasking, that the app has been shrinked. When I launch my app then, it takes a second for the event to fix the view.

So, this actually is an easy fix: check if app is in background and don't listen on events as long its not in foreground