atomiks / elastic-scroll-polyfill

macOS/iOS elastic scroll polyfill on scrollable elements

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Make it work on Android

atomiks opened this issue · comments

Seems like mobile Chrome doesn't fire the wheel event when scrolling.

commented

Hello,
I added support for Chrome on Android in my fork here: https://github.com/SkoshRG/elastic-scroll-polyfill

Would you be willing to merge this into the master branch if i cleaned up the extra dependencies (eg. parcel) and other small changes i made?

The way it works now is it uses a passive scroll event listener which calculates the deltas, and does the rest the same way your onWheel function does it.

Thanks! Sure.

Does that also fix the issue where sometimes the effect doesn't work at all? I've noticed that sometimes the scrolling instantly stops when reaching the scrolling boundary and the effect isn't reliably applied :\

commented

Hello, from the testing I have done, there doesn't appear to be any issues with the effect not working.

Also, if I have the time I would also try to implement the elastic-scroll when you are at the top of the scroll container. (eg. make it behave exactly similar to iOS scroll)

Anyways, I will now prepare my fork so that only the minimal changes are added, and then I will open up a pull request. Awesome library by the way, and the code is SUPER clean, love it!

Also, if I have the time I would also try to implement the elastic-scroll when you are at the top of the scroll container. (eg. make it behave exactly similar to iOS scroll)

I don't think that's possible as there's no trackpad release event unfortunately. But if you can come up with a solution that'd be amazing. It's something I've been wanting to achieve but haven't been able to.

Anyways, I will now prepare my fork so that only the minimal changes are added, and then I will open up a pull request. Awesome library by the way, and the code is SUPER clean, love it!

Great, thanks!