xamarin / Xamarin.Forms

Xamarin.Forms is no longer supported. Migrate your apps to .NET MAUI.
https://aka.ms/xamarin-upgrade
Other
5.62k stars 1.87k forks source link

ListView: TapGestureRecognizer and ContextActions #3680

Closed zimmerrol closed 5 years ago

zimmerrol commented 6 years ago

Description

When using a TapGestureRecognizer inside a Grid in a ViewCell together with ContextActions the tap event will be fired every time the user interacts with the item, even when the user is doing a longclick, which should open to action menu.

Steps to Reproduce

  1. Long press on an item

Expected Behavior

The context action menu should open and the user should be able to interact which the actions.

Actual Behavior

The context action menu is opened, but at the same time tap event of the gesture recognizer is called. If you are using this event to navigate (e.g. to a detail page) the user will not be able to use the action menu properly.

Basic Information

Reproduction Link

I uploaded a gist of the xaml which creates this problem.

TerryDieckmann commented 6 years ago

I can confirm that this issue is indeed present.

mfeingol commented 6 years ago

I'm seeing the same issue.

mfeingol commented 6 years ago

Still an issue with Xamarin Forms 3.2.0.839982.

zimmerrol commented 6 years ago

Is there an official update about this?

zimmerrol commented 6 years ago

Can anyone report a version which does not have this bug?

mfeingol commented 6 years ago

Still an issue with Xamarin Forms 3.3.0.967583.

TerryDieckmann commented 6 years ago

Any progress on this issue?

mfeingol commented 5 years ago

Still an issue with Xamarin Forms 3.4.0.1008975. :-(

mfeingol commented 5 years ago

A workaround: override StartSupportActionMode and OnSupportActionModeFinished on your main activity, use that to determine when to ignore the single click. Horrible, but seems to work.

samhouts commented 5 years ago

Duplicate of #1932