-
Notifications
You must be signed in to change notification settings - Fork 460
Using PointerGestureRecognizer to avoid blocking taps within Popup on iOS #2871
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
base: main
Are you sure you want to change the base?
Using PointerGestureRecognizer to avoid blocking taps within Popup on iOS #2871
Conversation
@dotnet-policy-service agree |
Thank you for this, I haven't had a chance to test it but I am a little worried about the Microsoft documentation on this: For some reason it doesn't claim to officially support iOS which either feels wrong from the docs or a potentially risky thing to include. Have you tested on iOS? To follow-up with an additional question, is the |
As far as I can see, iOS is supported in code, I just tested it and gave the exact same coordinates as the The funny thing is, that for Android So, to get this working with both platforms, |
The The For detecting a tap outside of the Popup I would use the more low level |
Or perhaps we go back to the idea of placing a view behind that can handle the tap detection. BoxView caused styling issues but we could create our own PopupBackground class that would allow developers to style it if they wanted (although it would fight with PopupOptions). This would save dealing with the platform differences that you mentioned. What do you think? |
I don't think styling the background will be needed in most usecases, having PageOverlayColor is good enough. Maybe it is also more complex, if you need to take safe-area's into account and it adds another layer in the UI. I updated my code to Popup v2 and hope this issue can be fixed soon, or use a workaround for the time being. The Android Thanks for your help Shaun! |
Description of Change
The
TapGestureRecognizer
to check for taps outside the popup hijacks the taps for inner (child) controls. Changed theTapGestureRecognizer
to aPointerGestureRecognizer
that does not block/intercept the tap gesture. The bug was introduced in this PR #2741 Tested on Android and iOS, the issue was only present on iOS.Linked Issues
2852
2727
PR Checklist
approved
(bug) orChampioned
(feature/proposal)main
at time of PRAdditional information
Added
CollectionView
with selectable items toComplexPopup
to test tapping aCollectionView
item within the Popup. When tapping an item, it sets the value of the ReturnTextEntry
.