If you start scrolling the list with a flick, you can tap the screen before the scrolling finished to make the scrolling stop early.
The problem is in Ionic 5, on a physical Android device, the tap to stop the scrolling also calls the (click) of any element underneath where you tapped.
The expected behavior would be for that tap to only stop the scrolling and not carry through to elements. It worked this way in Ionic 4. In Ionic 5 it still works that way on iOS but it's carrying the click through to other elements on Android.
Ionic version:
[x] 5.x
Current behavior:
The (click) event is firing on Android when you tap to stop the scroll
Expected behavior:
Stopping the scroll with a tap shouldn't open the item. This works correctly on iOS
Steps to reproduce:
Related code:
Thanks for the issue. What kind of Android device are you testing this on?
Thanks for the quick reply! We're testing on a Samsung Note 8 (SM-N950U), Android 9.0
Update: I can duplicate this in the Android emulator using the Pixel 2 API 29 as well.
Thanks for the follow up. I am able to reproduce this behavior. Still digging into why this is happening -- I will post an update here when I have more.
If you set [scrollEvents]="true" (for angular apps) on ion-content does that fix the issue?
@liamdebeasi Indeed this will fix this issue. But the solution is not very intuitive. This also will lead to performance regression on older devices.
Oddly enough scrollEvents were on for all Ionic 4 apps. I fixed that issue for v5, which is why this behavior change is appearing now. If your apps worked fine on v4 it should be safe to re-enable scrollEvents for now.
This may just be a quirk with the Chromium webview, but I am not 100% sure yet.
Most helpful comment
Thanks for the follow up. I am able to reproduce this behavior. Still digging into why this is happening -- I will post an update here when I have more.