Bug 60122 - LongClick on image not working
Summary: LongClick on image not working
Alias: None
Product: Forms
Classification: Xamarin
Component: Android ()
Version: 2.4.0
Hardware: PC Windows
: High normal
Target Milestone: ---
Assignee: E.Z. Hart [MSFT]
Depends on:
Reported: 2017-10-11 10:25 UTC by jerone
Modified: 2017-10-16 20:26 UTC (History)
6 users (show)

Tags: ac fr
Is this bug a regression?: Yes
Last known good build:

Custom image (282 bytes, text/plain)
2017-10-11 10:25 UTC, jerone
Custom image Android renderer (926 bytes, text/plain)
2017-10-11 10:25 UTC, jerone

Notice (2018-05-24): bugzilla.xamarin.com is now in read-only mode.

Please join us on Visual Studio Developer Community and in the Xamarin and Mono organizations on GitHub to continue tracking issues. Bugzilla will remain available for reference in read-only mode. We will continue to work on open Bugzilla bugs, copy them to the new locations as needed for follow-up, and add the new items under Related Links.

Our sincere thanks to everyone who has contributed on this bug tracker over the years. Thanks also for your understanding as we make these adjustments and improvements for the future.

Please create a new report on Developer Community or GitHub with your current version information, steps to reproduce, and relevant error messages or log files if you are hitting an issue that looks similar to this resolved bug and you do not yet see a matching new report.

Related Links:

Description jerone 2017-10-11 10:25:17 UTC
Created attachment 25267 [details]
Custom image

We have an custom renderer for long press clicks on images. Uptil XF, the long press clicks worked. After upgrading to XF the event is never fired anymore.
Comment 1 jerone 2017-10-11 10:25:51 UTC
Created attachment 25268 [details]
Custom image Android renderer
Comment 2 jerone 2017-10-11 14:54:34 UTC
I think I forgot to mention that this is only happening for Android. My solution for iOS works.
Comment 3 E.Z. Hart [MSFT] 2017-10-13 16:39:25 UTC
PR: https://github.com/xamarin/Xamarin.Forms/pull/1198
Comment 4 E.Z. Hart [MSFT] 2017-10-13 16:41:28 UTC

As a workaround until the fix is released, you might be able to make your custom renderer work by changing

`LongClick += LongPressGestureRecognizerImageRenderer_LongClick;`


`Control.LongClick += LongPressGestureRecognizerImageRenderer_LongClick;`

The bug is preventing LongClick from firing correctly on the renderer, but it should still work on the Control (the ImageView) contained by the renderer.
Comment 5 Paul DiPietro [MSFT] 2017-10-13 16:43:07 UTC
*** Bug 60170 has been marked as a duplicate of this bug. ***
Comment 6 Rui Marinho 2017-10-16 17:46:01 UTC
Should be fixed on 2.4.0 service release 2
Comment 7 jerone 2017-10-16 20:26:29 UTC
Thanks for notifying me and fixing the issue.

Also, I can confirm the workaround works.