I am working on Ionic 2 having Cordova 6.1.1. My app overscrolls for an up scroll and bounces on a text box focus.
This seems to be a generic problem and has some solutions for earlier versions of cordova.
The following preferences are set correctly in my config.xml.
<preference name="webviewbounce" value="false"/>
<preference name="UIWebViewBounce" value="false"/>
<preference name="DisallowOverscroll" value="true"/>
They do not work for Cordova 6.1.1 or above (6.2.0) !!
Thanks.
Correct way would be to set this in you app.ts.
import {Keyboard} from 'ionic-native';
this.platform.ready().then(() => {
Keyboard.disableScroll(true)
});
Thanks for your reply.
I was using position:absolute;
for a div
inside content where my form was. I removed it and did a few CSS
hacks to make it work as needed to avoid bounce on a text box focused.
This page is basically a log in page having company logo <img>
, company name <h1>
above two text boxes for username
and password
with a submit button
in the last row.
I did try with Keyboard.disableScroll(true)
It didn’t show any difference to me.
Also, the fixed action buttons(fab)
scrolls along the page for IOS until scroll stops when placed at bottom right of the screen. Is there a way we can have it stationary. I know position:fixed
does not work with Safari, I have used position:sticky;
for other fixed contents on my page for IOS.
Hello @shaikhspear, have you found solution? I have same problem with the overscroll, I have some screens that I want some parts to be scrollable but IOS bounces some UI which I dont want to… I have set preferencies as you did.
cli packages: (/Users/lucky/Documents/projects/nsdiapp/client/node_modules)
@ionic/cli-utils : 1.9.2
ionic (Ionic CLI) : 3.9.2
global packages:
Cordova CLI : 7.0.1
local packages:
@ionic/app-scripts : 2.1.3
Cordova Platforms : android 6.2.3 ios 4.4.0
Ionic Framework : ionic-angular 3.6.0
System:
ios-deploy : 1.9.1
ios-sim : 6.0.0
Node : v6.9.5
npm : 5.4.0
OS : macOS Sierra
Xcode : Xcode 8.3.3 Build version 8E3004b