Ionic-framework: bug: Ionic 5: Tapping to stop scrolling a list on an Android device evokes a (click) event

Created on 17 Feb 2020  路  7Comments  路  Source: ionic-team/ionic-framework

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.

Bug Report

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:

  1. Open the sample app attached on Android device
  2. Flick the list to start scrolling and tap to stop the scroll. The (click) event will fire on Android

Related code:

https://github.com/jswilliams/ionicListScrollBug

investigation

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.

All 7 comments

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.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

manucorporat picture manucorporat  路  3Comments

gio82 picture gio82  路  3Comments

fdnhkj picture fdnhkj  路  3Comments

MrBokeh picture MrBokeh  路  3Comments

giammaleoni picture giammaleoni  路  3Comments