Within my application, there exists a chat feature in which additional messages are loaded as the user scrolls up. I have implemented Ionic's default "infinite scroll" component with a position of 'top' in order to detect when the user reaches the top of the page and load more messages into the array. On both the browser and Android platforms, this functionality works seamlessly with a threshold of either 50% or 550px. However, when it comes to iOS devices (both physical devices and emulators), I encounter a peculiar issue illustrated in the accompanying image. The red portion of the image represents the visible screen area, while the black portion represents the total scroll length. In the case of iOS, the scroll view abruptly jumps to the top, resulting in the infinite scroll being triggered multiple times from a single action. This not only disrupts the user experience by causing the screen to jump erratically, but it also hinders the ability to view previous messages smoothly. I have attempted to address this problem by disabling scrolling, but to no avail. Additionally, iOS fails to recognize the infinite-scroll threshold, only triggering it when the user is precisely at the top of the scroll-view. Even after upgrading to WKWebView, the issue persistently lingers.
Platform Info: ionic-angular: 3.20.0 ios platform: 4.5.4