I'm building a web-app and I have this function for infinite scrolling on page:
window.onscroll = () => {
let bottomOfWindow = document.documentElement.scrollTop + window.innerHeight === document.documentElement.offsetHeight;
if (bottomOfWindow) {
//dostuff
}
}
It works perfectly on my computer (Chrome) but not on my phone (Chrome too).