argyleink / scrollyfills

grab and go polyfill functions for web scroll features
104 stars 10 forks source link

`scrollend` fires even if pointers are still down #4

Closed argyleink closed 2 years ago

argyleink commented 2 years ago

aka, this event can fire prematurely due to it's current timeout override strategy.

to reproduce, scroll partially then stop but keep your fingers on the track pad, notice it calls the callback. no pointers should be active in the scrollport or the callback shouldn't be made.

flackr commented 2 years ago

Yeah this is the harder part of scrollend to polyfill. If you think this is important, we could globally track fingers which are down and then assume that scrolls which start while a finger is down in that scroller are not done until that finger goes up.

argyleink commented 2 years ago

it's definitely important, all you have to do to feel it is half scroll to the next item and pause, and boom it'll grab scroll from you and snap. quite annoying/