-
Notifications
You must be signed in to change notification settings - Fork 1.9k
Revert "[Android][NET 10] Fix: Ensure Image consumes touches properly #29363
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
…dotnet#28429)" This reverts commit a71e593.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR reverts a previous commit that modified touch handling on Image controls for Android, addressing a regression introduced by the earlier fix. The key changes include:
- Removing the MapInputTransparent API mapping from the public API file.
- Reverting modifications in the Android-specific ImageHandler, including an accessibility-related property change.
- Adjusting a test case for Android to compile conditionally.
Reviewed Changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated no comments.
File | Description |
---|---|
src/Core/src/PublicAPI/net-android/PublicAPI.Unshipped.txt | Removed the MapInputTransparent API mapping to revert the previous change |
src/Core/src/Handlers/Image/ImageHandler.cs | Removed the mapping of InputTransparent from the handler's command mapper |
src/Core/src/Handlers/Image/ImageHandler.Android.cs | Removed the setting of ImportantForAccessibility on the platform view and the MapInputTransparent method |
src/Controls/tests/TestCases.Shared.Tests/Tests/Issues/Issue6262.cs | Wrapped a test case with a conditional compilation flag for Android |
Hey there @@kubaflo! Thank you so much for your PR! Someone from the team will get assigned to your PR shortly and we'll get it reviewed. |
/azp run |
Azure Pipelines successfully started running 3 pipeline(s). |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This should probably go, but just to note:
It's expected that Image
shouldn't pass touches to the view behind it — this only fails on Android (see ImageShouldLayoutOnTopOfButton
test).
From what I can tell, the original PR surfaced another issue with CollectionView
's touch handling:
- Instead of
CollectionView
intercepting the touch at the item level first and then letting it propagate to child views, the child views handle the touch before selection happens. - This causes
Image
(when it's notInputTransparent
) to consume the tap and prevent item selection.
Just wanted to call that out in case it's helpful context for the broader issue.
Tested the packages on WhatToEat and it fixes the regression |
/backport to release/10.0.1xx-preview4 |
Started backporting to release/10.0.1xx-preview4: https://github.com/dotnet/maui/actions/runs/14927435969 |
Note
Are you waiting for the changes in this PR to be merged?
It would be very helpful if you could test the resulting artifacts from this PR and let us know in a comment if this change resolves your issue. Thank you!
Description of Change
This reverts commit a71e593.
I'm not sure it is a right fix and I think it caused this regression #29349
Issues Fixed
Fixes #29349