xamarin/Xamarin.Forms
[Bug] ContextAction Button on ListView Cell on iOS passes Tap to Cell when CanExecute is false
Aberta
#8.763 aberto em 5 de dez. de 2019
a/listviewe/2 :clock2:good first issuehacktoberfest 🍻help wantedin-progresst/bug :bug:up-for-grabs
Métricas do repositório
- Stars
- (5.644 estrelas)
- Métricas de merge de PR
- (Nenhuma PRs mesclada em 30d)
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
- Clone the repository.
- Start the project on iOS.
- Open the ContextActions on an Item and Tap on the Context Action.
- 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