I am using the latest version of Phonegap on IOS (ipad) and I can\'t seem to disable the vertical overscroll/bounce on the whole app. I don\'t mind it on inner elements but
DisallowOverscroll does not work for me.
Solution is to ensure that there is nowhere to scroll.
For example, in my case it was div
wider (it can be higher) than the body like below:
<body>
<div style="margin: 5%" width: 95%;>something</div>
</div>
Now, above div
is 5% bigger than body that cause scrolling. Set width to 90% fixes the issue.
In config.xml of your project, under preferences for iOS set DisallowOverscroll to true.
<preference name="DisallowOverscroll" value="true" />
Try This One If you are ionic framework user Abc.html file inside content.
<ion-content has-bouncing="false">
The accepted answer did not work for me, I had to set UIWebViewBounce
to false
:
<preference name="UIWebViewBounce" value="false" />
Thanks For All answer. But If you have issue in windows Phone here is the solution. Just go to MainPage.xaml.cs file and replace below function..
public MainPage()
{
InitializeComponent();
this.CordovaView.DisableBouncyScrolling = true;
this.CordovaView.Loaded += CordovaView_Loaded;
}
Its works for me :)
For Cordova 7 and an iPhone 7 + iOS 11.0.3, modifying the root-directory config.xml and adding this worked beautifully:
<platform name="ios">
<preference name="DisallowOverscroll" value="true" />
<preference name="UIWebViewBounce" value="false" />
... (other stuff) ...
</platform>