How can we disable scrolling when it reaches 80% at the bottom? I started the disable scroll functionality from the code below, but it does not work in iPhone. source
useEffect(() => {
document.addEventListener('touchstart', function(e) {e.preventDefault()}, false);
document.addEventListener('touchmove', function(e) {e.preventDefault()}, false);
}, []);
Is there a js/CSS way or any package that could detect the scrolling percentage? And disable it when reaches around 80% bottom (but can scroll up again)?