Search code examples
ioscordovaphonegaphtml-framework-7

Gray background on scroll in a Cordova iOS App


I'm working on a mobile app using Phonegap/Cordova. I built the ipa file using Phonegap Build and installed it on my iPhone.

I noticed when I scroll up or down at the edges of the view (like iOS bounce scrolling), the whole application view scrolls down (or up) and a gray background color appears.

I tried finding if there's a CSS code for that, but no luck. I'm guessing maybe its something related to view-port.

Things to Consider: - I'm using Framework7 v3 - PhoneGap Build cli-6.5.0 - iPhone 6S Plus

Screenshots of the issue:

enter image description here

What can be done to fix this bug?


Solution

  • Add the following to to your config.xml and then run cordova prepare:

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