xamarin/Xamarin.Forms

[Bug] Tap event not firing inside scrollview

Ouverte

#6 257 ouverte le 22 mai 2019

 (1 commentaire) (0 réaction) (0 personne assignée)C# (1 926 forks)batch import
a/gestures 🖖e/3 :clock3:help wantedinactivep/Androidt/bug :bug:up-for-grabs

Métriques du dépôt

Stars
 (5 644 étoiles)
Métriques de merge PR
 (Métriques PR en attente)

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

Guide contributeur