Disable scroll bouncing on div scrolling

390 views
Skip to first unread message

Amrit Kahlon

unread,
Oct 29, 2014, 3:23:22 PM10/29/14
to phon...@googlegroups.com
I am aware you can prevent the entire view from scrolling with:
<preference name="DisallowOverscroll" value="true" />

which works great, but I am trying to stop the elastic bouncing effect on regular div scrolling. Is there a way to do it through cordova? Or do I have to look to an ugly javascript solution?

I have tried:

<preference name="webviewbounce" value="false" />

<preference name="UIWebViewBounce" value="false" />


Neither has worked. I recall being able to do this on one of the older versions of Cordova. I'm using cordova ios 3.6.3 on iOS 8.

Thanks


Kerri Shotts

unread,
Oct 29, 2014, 4:34:56 PM10/29/14
to phon...@googlegroups.com
Remove the -webkit-overflow-scrolling: touch rule on your scrolling elements. (Or give it the value of "auto".)

In general, I'm not sure I would suggest this -- the resulting scrolling feels far from natural, and is not a good user experience, IMNSHO.

Amrit Kahlon

unread,
Oct 29, 2014, 4:50:24 PM10/29/14
to phon...@googlegroups.com
Ah that sucks since I need the webkit-overflow-scrolling for the native like smooth scrolling though. I just don't want the overscroll since it triggers my scrolling downward listener and causes some issues. I was hoping for an easy fix, but I'll have to prevent the event from firing when you're at the top of the page. 

Thanks.
Reply all
Reply to author
Forward
0 new messages