dotnet / maui

.NET MAUI is the .NET Multi-platform App UI, a framework for building native device applications spanning mobile, tablet, and desktop.
https://dot.net/maui
MIT License
22.21k stars 1.75k forks source link

Adding TapGestureRecognizer to Child control restricts touch for Parent control in Android platform #21180

Open VishalOmprasad opened 7 months ago

VishalOmprasad commented 7 months ago

Description

We have created a simple sample with layout structure using AbsoluteLayout along with HandlerChanged event and Grid. The Grid has another nested Grid having TapGestureRecognizer for handling tap gestures. In the code-behind we have invoked Touch event for Android. Upon deploying the sample, when touching the child Grid, the Touch event is not triggered, thus the touch is not passed to the parent.

Steps to Reproduce

  1. Create dotnet maui default project.
  2. Add an AbsoluteLayout element and subscribe to the HandlerChanged event in the code-behind.
  3. Inside the AbsoluteLayout, add a Grid element and define its layout properties.
  4. Inside the first Grid, add another Grid element to create a nested structure.
  5. Add a TapGestureRecognizer to the nested Grid in order to handle tap events.
  6. Deploy the application on the Android platform.
  7. Touch the child Grid area.
  8. Observe if the Touch event handler is triggered (in our case the Touch event is not triggered)

The issue reproducible sample is added below: AbsoluteLayoutTouch.zip

Link to public reproduction project repository

No response

Version with bug

Unknown/Other

Is this a regression from previous behavior?

Not sure, did not test other versions

Last version that worked well

Unknown/Other

Affected platforms

Android

Affected platform versions

No response

Did you find any workaround?

No response

Relevant log output

No response

XamlTest commented 7 months ago

Verified this on VS 17.10.0 Preview 2.0(8.0.14). Repro on Android 14.0-API34 with below Project: AbsoluteLayoutTouch.zip