- Issue created by @sagarb17
- 🇺🇦Ukraine oleksandr p. Lutsk
Faced with a similar issue on my project.
After a little investigation, I found incorrect triggering of the scroll event on the mobile devices, because this event was missed from the general event list.
Fixed by changing the "scroll" event to "touchmove".
Something like that:// Trick to fix the infinite scroll on mobile devices. if (window.innerWidth <= 992) { scrollEvent = 'touchmove'; }
Hope, my comment will be helpful to someone)
I tested this on my local setup with Drupal 11 and PHP 8.3, using the Infinite Scroll module in a View. I also tested it on a mobile emulator, and the scrolling behavior worked as expected—content loads correctly while scrolling on mobile.
To help debug this further, could you please provide exact steps to reproduce the issue? Specifically:
Drupal version and PHP version you're using.
Any custom configurations in the View (e.g., caching settings, exposed filters, pager settings).
Whether the issue happens on specific mobile devices or all mobile browsers.
If any JavaScript errors appear in the browser console when scrolling on mobile.Let me know if you spot any differences or if there's anything specific..
- 🇮🇳India kulpratap2002
I also tested this on my local setup with Drupal 11 and PHP 8.3, using the Infinite Scroll module in a View. I also tested it on a mobile emulator, and the scrolling behavior worked as expected, with +1 to #3.
Attaching video for reference.
Thank you.