xamarin/Xamarin.Forms

[Bug] Tap event not firing inside scrollview

Aperta

#6257 aperta il 22 mag 2019

 (1 commento) (0 reazioni) (0 assegnatari)C# (1926 fork)batch import
a/gestures 🖖e/3 :clock3:help wantedinactivep/Androidt/bug :bug:up-for-grabs

Metriche repository

Star
 (5644 stelle)
Metriche merge PR
 (Nessuna PR mergiata in 30 g)

Descrizione

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

Guida contributor