xamarin/Xamarin.Forms

[Bug] ContextAction Button on ListView Cell on iOS passes Tap to Cell when CanExecute is false

开放

#8,763 创建于 2019年12月5日

 (0 条评论) (0 个反应) (0 位负责人)C# (1,926 个派生)batch import
a/listviewe/2 :clock2:good first issuehacktoberfest 🍻help wantedin-progresst/bug :bug:up-for-grabs

仓库指标

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

描述

Description

When you add a ItemTapped event to a ListView and fill it's ViewCells ContextActions with a MenuItem whose Commands CanExecute is false, then tapping that ContextActions button on iOS will simply pass the tap to the underlying ViewCell. This seems like a bug to us, tapping a disabled button at that point should simply not do anything at all.

Steps to Reproduce

  1. Clone the repository.
  2. Start the project on iOS.
  3. Open the ContextActions on an Item and Tap on the Context Action.
  4. Notice that the Taps on Items counter has increased by one, indicating that the ItemTapped on the ListView has been fired.

Expected Behavior

The ItemTapped on the ListView should not be fired.

Actual Behavior

The ItemTapped on the ListView is fired.

Basic Information

  • Version with issue: Noticed in 4.2.0.709249 and later
  • Last known good version: -
  • IDE: Microsoft Visual Studio Professional 2019
  • Platform Target Frameworks:
    • iOS: 13.1

Reproduction Link

https://github.com/BasileusBasileon/Xamarin-ListView-ContextAction-iOS-Bug

贡献者指南