d4nyll / smartscroll

jQuery plugin for scrolljacking and auto-hashing
https://d4nyll.github.io/smartscroll/
MIT License
257 stars 46 forks source link

Trackpad touch events #9

Open maoosi opened 9 years ago

maoosi commented 9 years ago

Your plugin seems very promising, and if it keeps the promises made in your comparison, then it can be a real alternative to fullPage.js. However, it's impossible for me to implement it before touch trackpads events be supported. Do you plan to implement it soon?

Thanks,

d4nyll commented 9 years ago

Thank you for the appreciation!

If by trackpads you mean laptop trackpads and Apple Magic mouse, then those are implemented already; if it doesn't work for you, then that should be classed as a bug.

If, however, you mean touch events like those on mobile phones and tablets, then yes those are not supported.

Do you plan to implement it soon?

Currently I am setting up my web development shop in Hong Kong, and so there's a lot of work for me at the moment, on top of client's work. I will have more time available from the middle of June. I will definitely refine this package, as well as my other repositories then.

maoosi commented 9 years ago

Thanks for your reply.

Actually yes I think there is a problem when using a laptop trackpad.

It's curious because it's working when I goes down in the page and goes up again, but only the first time. If I try to go down again, it no longer works.

No problem using mouse scroll.

d4nyll commented 9 years ago

Because smartscroll uses d4nyll/lethargy, it's probably an issue with that. It works the first time because in lethargy, the first 15 scrollevents fired will be considered valid.

The idea is that if you use mousescroll, the events should be valid anyways. If you use trackpad or Apple Mouse, because a lot more than 15 scroll events are fired for each scroll intent, the 15-event buffer will get filled up on the first scroll you make, and so subsequent scroll should only fire once.

I have found that trackpads behave different across devices, so it'd be a great help to me if you can try the test here and share with me your findings. You can find some examples on my blog post, which also explains the logic behind lethargy.

I hope this helps you understand how it works. But to actually resolve the issue, I will have to wait til next month when I can dedicate more time on it! (But it will be done, that you can count on)

d4nyll commented 9 years ago

@maoosi I have some time to work on this now. If you can tell me which page on the demo does not work, that'd be great. Also, please help me by running your device against this test and posting the image that you get.

I appreciate that you might have used another library in the mean time, but I would like to have your help in refining this package, so any help is appreciated!

maoosi commented 9 years ago

@d4nyll Yes, sorry I didn't get time to do that yet. In order to get it, I will have to rebuild a test page because I switched to something else in between, but I will do that as soon as possible, when I have some time.

d4nyll commented 9 years ago

@maoosi Thank you for any help you can give. Much appreciated!

maoosi commented 8 years ago

It's better late than never !

Gigabyte P34 Trackpad: gigabytep34trackpad

atelierZuppinger commented 8 years ago

Hi folks, I get the same problem with my pages. First scroll up with magic mouse confuses Lethargy. Here are my results with your jsFiddle: capture d ecran 2015-11-04 a 09 18 58 capture d ecran 2015-11-04 a 09 18 27

jithinktom commented 8 years ago

May I know when will this be fixed?

d4nyll commented 8 years ago

With @maoosi's profile, I don't know if there's that much I can do about it, simply because the wheelDelta values are so low, it won't be accurate.

@atelierZuppinger I don't see a problem with your profile, if anyone can help me debug it, I'd be more than happy to accept your help!