Reputation: 37769
Many mobile browsers (iOS Safari until v8, iOS Chrome, and I think some Android browsers) don't fire multiple scroll events while the page is scrolling - instead they just fire a single scroll event when the movement comes to a stop.
Is there any way to feature-detect this behaviour?
Upvotes: 0
Views: 22
Reputation: 1625
A good article that breaks this behaviour down can be seen here for the uninformed.
As for your question, potentially you could "feature-detect" it by waiting to see if there's a scroll
event fired after a touchmove
event? It's not a perfect solution but it would work after the user first scrolls. That said, touch events are still a little quirky themselves.
That said, you may need to find an alternative solution to whatever the problem is that you're trying to solve given the behavioural quirks across all the different mobile browsers--scroll behaviour isn't very well defined in mobile browsers as yet, and it'll get to be very hard to deal with performantly.
Upvotes: 1