Bug 45014 - Only top level TapGestureRecognizer works on iOS when multiples are on same view
Summary: Only top level TapGestureRecognizer works on iOS when multiples are on same view
Status: RESOLVED DUPLICATE of bug 36780
Alias: None
Product: Forms
Classification: Xamarin
Component: iOS ()
Version: 2.3.3
Hardware: PC Windows
: Normal normal
Target Milestone: ---
Assignee: Bugzilla
URL:
Depends on:
Blocks:
 
Reported: 2016-10-04 15:46 UTC by John Miller [MSFT]
Modified: 2017-06-05 16:58 UTC (History)
8 users (show)

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


Attachments
Sample Project (198.57 KB, application/zip)
2016-10-04 15:46 UTC, John Miller [MSFT]
Details


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:
Status:
RESOLVED DUPLICATE of bug 36780

Description John Miller [MSFT] 2016-10-04 15:46:38 UTC
Created attachment 17865 [details]
Sample Project

**Overview**:

When a view has multiple TapGestureRecognizers on it, only the top level recognizer fires it's tapped event.

**Steps to Reproduce**:

1. Run the attached project on an iOS simulator
2. Tap the label in the center of the screen
3. Observe the output

**Actual Results**:

Only the "Tapped 1" text is shown.

**Expected Results**:

Both the "Tapped 1" and "Tapped 2" text should be shown.

**Build Date & Platform**:

XF 2.3
iOS 10

**Additional Information**:

http://stackoverflow.com/q/39443128/1454417
Comment 1 mhashim 2016-12-06 06:51:28 UTC
I don't know if this should be filed here but when a visual element has behavior and a tap gesture recognizer the same thing happens, but the last element wins.
Comment 2 E.Z. Hart [MSFT] 2017-06-02 23:12:39 UTC
(In reply to John Miller from comment #0)
> When a view has multiple TapGestureRecognizers on it, only the top level
> recognizer fires it's tapped event.
> 
> **Steps to Reproduce**:
> 
> 1. Run the attached project on an iOS simulator
> 2. Tap the label in the center of the screen
> 3. Observe the output
> 
> **Actual Results**:
> 
> Only the "Tapped 1" text is shown.
> 
> **Expected Results**:
> 
> Both the "Tapped 1" and "Tapped 2" text should be shown.
> 
> **Build Date & Platform**:

In the attached project, the second TapGestureRecognizer has 'NumberOfTapsRequired' set to 2; I would not expect that recognizer to fire when tapping the Label once. Is that just a typo in the repro project?
Comment 3 E.Z. Hart [MSFT] 2017-06-05 16:58:35 UTC
Oh, never mind John. On looking at your repro again, I see that the code in SimulGestures.cs wasn't part of the actual repro. After looking at the code in SimulGesturesXaml.xaml.cs, this appears to be a duplicate of issue 36780.

*** This bug has been marked as a duplicate of bug 36780 ***