xamarin/Xamarin.Forms

[Bug] Tap event not firing inside scrollview

Open

#6,257 opened on May 22, 2019

 (1 comment) (0 reactions) (0 assignees)C# (1,926 forks)batch import
a/gestures 🖖e/3 :clock3:help wantedinactivep/Androidt/bug :bug:up-for-grabs

Repository metrics

Stars
 (5,644 stars)
PR merge metrics
 (No merged PRs in 30d)

Description

Description

When compiling the android project using 9.0, any items inside a scrollview will no longer fire the click event immediately when the scrollview moves

Steps to Reproduce

  1. Create a xaml view that contains a scrollview with a clickable element
  2. Swipe the view to trigger a scroll and tap the element

Expected Behavior

The click event fires immediately on tapping the element

Actual Behavior

The element must be tapped twice, or the user must wait upwards of 2-3 seconds after scrolling then tap before the event will fire

Basic Information

Works as expected with 8.1 and below. Tested using buttons, labels, stacklayouts and frames, with click event listeners in the code behind and commands in the viewmodel. Consistently recreated in every scenario. The scroll gesture must be a flick/swipe i.e. so the scroll continues after the user stops touching the screen, seems to work as expected with a slow controlled scroll. Created a separate test android project using 9.0 that did not use Forms and the tap event worked as expected.

  • Version with issue: 4.0.0.425677
  • Last known good version: unknown
  • IDE: Visual Studio 2019
  • Platform Target Frameworks:
    • Android: 9.0
  • Android Support Library Version:
  • Nuget Packages:
  • Affected Devices:

Screenshots

Reproduction Link

https://github.com/stephenclarkstorefeeder/XamarinFormsClickOnScrollIssue

Contributor guide