pagePiling.js icon indicating copy to clipboard operation
pagePiling.js copied to clipboard

The sensitivity of the scroll to the anchor too sensitive

Open gbrle opened this issue 5 years ago • 6 comments

Hi, again me :) I have a problem of sensitivity, when I barely touch the screen in mobile version, I go directly to the anchor after.

How can I solve this problem?

Thank you :)

gbrle avatar Nov 17 '19 01:11 gbrle

Apparently the "touchSensitivity" is used to solve the problem, but it does not work, nothing changes when I change the value :(

I am blocked

gbrle avatar Nov 17 '19 02:11 gbrle

Hello there, I have been using Pagepiling for quite a while now, and this issue has bothered me ever since. I never got to finding a fix until I saw your post today and decided to give it one more try for myself.

After quite a while, I stumbled upon this reported issue: https://github.com/alvarotrigo/pagePiling.js/issues/52

...and figured, that the sensitivity didn't work because in my case container.height() also returned 0. So as proposed on Bountysource, I set my container-height manually to 100%.

In the jquery.pagepiling.js file I changed this:

    $(container).css({
        'overflow' : 'hidden',
        '-ms-touch-action': 'none',  /* Touch detection for Windows 8 */
        'touch-action': 'none'       /* IE 11 on Windows Phone 8.1*/
    });

...to this:

    $(container).css({
        'height': '100%',
        'overflow' : 'hidden',
        '-ms-touch-action': 'none',  /* Touch detection for Windows 8 */
        'touch-action': 'none'       /* IE 11 on Windows Phone 8.1*/
    });

This seems to have fixed my issue. On my mobile device, pagepiling no longer fires, when I just tap the screen, but actually now only fires when it recognizes a swiping motion. Hope this helps resolving your issue, too.

akapowl avatar Nov 17 '19 17:11 akapowl

Perfect !!!

But, for me, the "100%" not work, "100vh" is OK.

On pagepiling 1.5.5 , the line is :

height: '100vh',overflow:"hidden","-ms-touch-action":"none","touch-action":"none"

Thx you so much !

gbrle avatar Nov 17 '19 22:11 gbrle

Thanks for the insights guys!
I'll try to fix it at some point!

alvarotrigo avatar Nov 18 '19 12:11 alvarotrigo

Perfect !!!

But, for me, the "100%" not work, "100vh" is OK.

On pagepiling 1.5.5 , the line is :

height: '100vh',overflow:"hidden","-ms-touch-action":"none","touch-action":"none"

Thx you so much !

"height":"100vh" is working perfectly for me too.

Thanks.

FazleRabbiRana avatar Oct 10 '20 09:10 FazleRabbiRana

@akapowl hi! U can help me fix that problem? 100vh and 100% doents work :(

yanballas avatar Nov 24 '23 12:11 yanballas