jQuery .scroll() event not triggering in mobile Safari iOS 15 under certain conditions
Hey everyone, I'm running into an issue that's driving me crazy. Hey everyone, I'm running into an issue that's driving me crazy. I'm currently working on a web application that relies heavily on jQuery to handle scrolling events for a feature that loads additional content dynamically. However, I've encountered a peculiar scenario where the `.scroll()` event is not triggering in mobile Safari on iOS 15 when the page is loaded with a specific viewport height. Here's the scenario: when the viewport height is set to 100vh, the scroll event seems to unexpected result when attempting to load content as the user scrolls down. To check if it was an scenario with the code, I tried logging the scroll position: ```javascript $(window).on('scroll', function() { console.log('Scroll position: ' + $(this).scrollTop()); }); ``` But no output appears in the console when I scroll, even though the same code works perfectly in Chrome and Firefox on desktop. I've also tried debouncing the scroll event to improve performance, but that didn't help: ```javascript let debounce; $(window).on('scroll', function() { clearTimeout(debounce); debounce = setTimeout(function() { console.log('Debounced scroll position: ' + $(window).scrollTop()); }, 100); }); ``` The content dynamically loads as expected when the scrollbar is manipulated through touch gestures, but again, the `scroll` event remains untriggered. I've double-checked if any CSS properties like `overflow` might be causing this, but everything seems fine. I've also tested on iOS 14, and it works without issues. Is there something specific to iOS 15 that could be causing this behavior? Any insights would be greatly appreciated. This is part of a larger application I'm building. Any help would be greatly appreciated! I'm using Javascript latest in this project.