Closed Speculative closed 7 years ago
works on firefox and chrome for linux
If I remember correcty, high DPI scrollwheels (usually those on mac touchpads, magic mice) send way more scroll events than others, so you typically want to limit the polling speed with something like
lastTrigger = 0;
window.onscroll = () => {
let now = new Date().getTime();
if ( > lastTrigger + limit) {
lastTrigger = now;
doThing();
}
}
or somesuch
Did it. Fixed the infinite scroll bug I was having with iOS Safari that was making it load a lot of stuff when I triggered it for the first time.
Pull & test this on as many browsers as you can pls (including mobile)