Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

scroll error on macbook trackpad #87

Closed
Jossnaz opened this issue Jan 28, 2016 · 6 comments
Closed

scroll error on macbook trackpad #87

Jossnaz opened this issue Jan 28, 2016 · 6 comments
Labels
bug

Comments

@Jossnaz
Copy link

@Jossnaz Jossnaz commented Jan 28, 2016

the scroll error occurs when on the alvarotrigo site http://alvarotrigo.com/pagePiling/ I scroll down on my macbook trackpad to the fourth page and then attempt to scroll again - it takes me back to the third page, and then to the fourth http://jmp.sh/oOKku7C
I was unable to reproduce this here: http://www.alvarotrigo.com/fullPage/#secondPage
this also occurs occaisonally on the third (final) page without scrolling again
you scroll 1 then 2 then 3, then pause as if to read the third slide, but it goes back to the second slide

@alvarotrigo

This comment has been minimized.

Copy link
Owner

@alvarotrigo alvarotrigo commented Jan 28, 2016

Thanks for reporting it.
I have the impression I also experienced that at some point. I'll check it whenever I have access to a MacBook.

@eliawk

This comment has been minimized.

Copy link

@eliawk eliawk commented Jan 29, 2016

same problem here!

@sonidiaz

This comment has been minimized.

Copy link

@sonidiaz sonidiaz commented Feb 23, 2016

Replace this function in line 561

function MouseWheelHandler(e) {
if(!isMoving()){
// cross-browser wheel delta
e = window.event || e;
var delta = Math.max(-1, Math.min(1,
(e.wheelDelta || -e.deltaY || -e.detail)));

            var activeSection = $('.pp-section.active');
            var scrollable = isScrollable(activeSection);

            //scrolling down?
            if (delta < 0) {
                scrolling('down', scrollable);

            //scrolling up?
            }else {
                scrolling('up', scrollable);
            }


            return false;
        }
     }

for this:

function MouseWheelHandler(e) {
if(!isMoving()){
// cross-browser wheel delta
e = window.event || e;

            var tdelta = (e.wheelDelta || -e.deltaY || -e.detail);
            if(tdelta !== 0){
                var delta = Math.max(-1, Math.min(1, tdelta));
            } else {
                return false;
            }


            var activeSection = $('.pp-section.active');
            var scrollable = isScrollable(activeSection);

            //scrolling down?
            if (delta < 0) {
                scrolling('down', scrollable);

            //scrolling up?
            }else {
                scrolling('up', scrollable);
            }


            return false;
        }
     }
@Jossnaz

This comment has been minimized.

Copy link
Author

@Jossnaz Jossnaz commented Feb 23, 2016

I actually pulled the plug on pagePiling.js, it is just not a viable solution if what, all mac books are buggy.
A solution for me was this:
https://github.com/peachananr/onepage-scroll

i am not posting it to pull away users from your plugin. But I am sure you can let yourself get inspired by their solution. And for the others, use this plugin until u implemented a solution.

@alvarotrigo

This comment has been minimized.

Copy link
Owner

@alvarotrigo alvarotrigo commented Feb 23, 2016

I actually pulled the plug on pagePiling.js, it is just not a viable solution if what, all mac books are buggy.

@Jossnaz the bug was not there originally and it seems it has been introduced due to some browsers' update. I had no time to take a look at this bug yet as I have other priorities at the moment.

In any case, if you want a similar solution similar to the one you posted, you can go for fullPage.js (which I also created) if you want a more compatible (IE8 included) reliable and configurable solution than the one you posted.

alvarotrigo added a commit that referenced this issue Feb 23, 2016
- Fixed bug when scrolling with an Apple trackpad #87
- Improved scrolling detection so it won’t scroll when scrolling
horizontally on Apple trackpads.
- Improved scrolling to prevent double scroll when scrolling very fast
on Apple trackpad or kinetic scrolling devices
- Improved comments so they won’t get deleted on minification.
@alvarotrigo

This comment has been minimized.

Copy link
Owner

@alvarotrigo alvarotrigo commented Feb 23, 2016

Solved in pagePiling.js 1.5.3. Please update.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
4 participants
You can’t perform that action at this time.