3

We have an application with the following behavior when the keyboard is opened on iOS (it does not happen on Android):

We tried to let the screen content aligned to the top with padding-top: 0px but this "flicker" still happens. Only difference is that when aligned to the top the gray bar is smaller.

If we disable the scroll with cordova.plugins.Keyboard.disableScroll(true); the issue does not happen but the screen does not scroll so the touched field stay hidden behind the keyboard. Does anyone got this issue and managed to solve it?

Cordova CLI: 6.4.0 
Ionic CLI Version: 2.1.17
Ionic App Lib Version: 2.1.7
ios-deploy version: 1.9.0 
ios-sim version: 5.0.13 
OS: macOS Sierra
Node Version: v7.5.0
Xcode version: Xcode 8.2.1 Build version 8C1002
mxmlc
  • 459
  • 4
  • 19

1 Answers1

0

Open config.xml and add this:

<preference name="DisallowOverscroll" value="true"/>
<preference name="webviewbounce" value="false"/>
<preference name="UIWebViewBounce" value="false"/>

if aren't there

Tam Nguyen
  • 115
  • 1
  • 9
  • Nguyễn, unfortunately they already are in my config.xml with the same values. – mxmlc Feb 09 '17 at 10:23
  • ok then just follow this http://stackoverflow.com/questions/13820088/how-to-prevent-keyboard-push-up-webview-at-ios-app-using-phonegap – Tam Nguyen Feb 09 '17 at 10:30
  • I tried the `preventDefault` and `stopPropagation` without success. Curiously when I put a breakpoint in any line of the function created to store both calls the gray bar does not appear. Even tried with `scrollTop` but same result. – mxmlc Feb 09 '17 at 15:43
  • try this, final thing cross my mind cordova.plugins.Keyboard.disableScroll(true); – Tam Nguyen Feb 09 '17 at 15:49
  • Sorry, I mistyped this in my question. `disableScroll(true)` prevents this behavior but the field stay hidden behind the keyboard as said in the question. – mxmlc Feb 09 '17 at 16:08