Skip to content
This repository has been archived by the owner on May 1, 2024. It is now read-only.

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

Open
BasileusBasileon opened this issue Dec 5, 2019 · 0 comments
Labels
a/listview Problems with the ListView/TableView e/2 🕑 2 good first issue hacktoberfest 🍻 help wanted We welcome community contributions to any issue, but these might be a good place to start! in-progress This issue has an associated pull request that may resolve it! t/bug 🐛 up-for-grabs We welcome community contributions to any issue, but these might be a good place to start!

Comments

@BasileusBasileon
Copy link

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

@BasileusBasileon BasileusBasileon added s/unverified New report that has yet to be verified t/bug 🐛 labels Dec 5, 2019
@PureWeen PureWeen added up-for-grabs We welcome community contributions to any issue, but these might be a good place to start! help wanted We welcome community contributions to any issue, but these might be a good place to start! e/2 🕑 2 a/listview Problems with the ListView/TableView and removed s/unverified New report that has yet to be verified labels Dec 5, 2019
@samhouts samhouts added this to the 5.0.0 milestone Aug 13, 2020
@samhouts samhouts removed this from the 5.0.0 milestone Nov 2, 2020
@samhouts samhouts added the in-progress This issue has an associated pull request that may resolve it! label Nov 2, 2020
l4nk4b3l pushed a commit to l4nk4b3l/Xamarin.Forms that referenced this issue Oct 15, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
a/listview Problems with the ListView/TableView e/2 🕑 2 good first issue hacktoberfest 🍻 help wanted We welcome community contributions to any issue, but these might be a good place to start! in-progress This issue has an associated pull request that may resolve it! t/bug 🐛 up-for-grabs We welcome community contributions to any issue, but these might be a good place to start!
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants