xamarin/Xamarin.Forms

[Bug] Tap event not firing inside scrollview

开放

#6,257 创建于 2019年5月22日

 (1 条评论) (0 个反应) (0 位负责人)C# (1,926 个派生)batch import
a/gestures 🖖e/3 :clock3:help wantedinactivep/Androidt/bug :bug:up-for-grabs

仓库指标

星标
 (5,644 个星标)
PR 合并指标
 (30 天内没有已合并 PR)

描述

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

贡献者指南