Bug 60823 - Touch events do not dispatch to the Grid on Android
Summary: Touch events do not dispatch to the Grid on Android
Status: RESOLVED ANSWERED
Alias: None
Product: Forms
Classification: Xamarin
Component: Android (show other bugs)
Version: 2.5.0
Hardware: PC Windows
: Normal normal
Target Milestone: ---
Assignee: Bugzilla
URL:
Depends on:
Blocks:
 
Reported: 2017-11-23 08:52 UTC by Vladimir
Modified: 2018-02-21 21:01 UTC (History)
2 users (show)

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


Attachments
INCORRECT! Test application (42.69 KB, application/x-zip-compressed)
2017-11-23 08:52 UTC, Vladimir
Details
Updated (working) sample (for Xamarin.Forms 2.4.0.269-pre2) (42.05 KB, application/x-zip-compressed)
2017-11-30 14:30 UTC, Vladimir
Details
Updated (working) sample (for Xamarin.Forms 2.3.4.270) (42.07 KB, application/x-zip-compressed)
2017-11-30 14:31 UTC, Vladimir
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 ANSWERED

Description Vladimir 2017-11-23 08:52:51 UTC
Created attachment 25808 [details]
INCORRECT! Test application

Hello!

Starting with the Xamarin.Forms 2.4.0.266-pre1, touch events do not dispatch to the Grid laying inside another Grid even if the inner Grid has a subscription to touch events.

The attached solution demonstrates this issue. Steps to reproduce:
1. Tap on the red text "Tap me (inner Grid)!"
2. The top label "Was tapped:" doesn't change its text though it should become "Was tapped: Inner Grid (red label)". This means that the inner Grid does not receive the touch event.

With the Xamarin.Forms 2.3.5.256-pre6 and earlier versions all works correctly.
Comment 1 Paul DiPietro [MSFT] 2017-11-29 15:29:21 UTC
Using the provided project, I'm getting the same result on 2.3.4 as well as the 2.4.0+ versions on an S8 device (as well as an emulator); tapping the red grid as described does not change the text. I'm assuming that the correct behavior of the text changing should occur on the lower versions. Is there a specific device where this works in your use case, or do you have more info to provide with regards to this issue?
Comment 2 Vladimir 2017-11-30 14:30:31 UTC
Created attachment 25873 [details]
Updated (working) sample (for Xamarin.Forms 2.4.0.269-pre2)

New version (working).
Comment 3 Vladimir 2017-11-30 14:31:25 UTC
Created attachment 25874 [details]
Updated (working) sample (for Xamarin.Forms 2.3.4.270)
Comment 4 Vladimir 2017-11-30 14:50:15 UTC
Hello Paul,

Sorry for misleading you. You are right, it works correctly. I have modified the sample and attached it (both for the 2.3.4.270 and 2.4.0.269-pre2 Xamarin.Forms). Actual steps to reproduce now are the following:
1. Tap on the red text "Tap me (inner Grid)!"
2. The top label "Was tapped:" will become "Root Grid (green label)", though it should become "Was tapped: Inner Grid (red label)". This means that the inner Grid does not receive the touch event.

All works correctly with Xamarin.Forms 2.3.4.270 and earlier versions.
Comment 5 Vladimir 2017-11-30 15:47:38 UTC
Added info
Comment 6 Paul DiPietro [MSFT] 2017-11-30 23:53:38 UTC
Thank you for giving the updated projects. I upgraded the second one straight away to 2.5.0 stable where that issue occurs, so for now this will be moved to confirmed until further investigation can be made. It's presumed this might be a regression so I'll mark it as such.
Comment 7 Vladimir 2017-12-25 12:12:18 UTC
Hello!

Any updates? This issue is preventing us from updating the GridControl.
Comment 8 Paul DiPietro [MSFT] 2018-02-21 21:01:53 UTC
Please follow https://github.com/xamarin/Xamarin.Forms/issues/1942 for updates to this issue.