xamarin/Xamarin.Forms

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

Ouverte

#8 763 ouverte le 5 déc. 2019

 (0 commentaire) (0 réaction) (0 personne assignée)C# (1 926 forks)batch import
a/listviewe/2 :clock2:good first issuehacktoberfest 🍻help wantedin-progresst/bug :bug:up-for-grabs

Métriques du dépôt

Stars
 (5 644 étoiles)
Métriques de merge PR
 (Aucune PR mergée en 30 j)

Description

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

Guide contributeur