-
Notifications
You must be signed in to change notification settings - Fork 1.7k
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
Tapping to close a SwipeView will activate TapGestureRecognizers on .Content #23921
Comments
Hi I'm an AI powered bot that finds similar issues based off the issue title. Please view the issues below to see if they solve your problem, and if the issue describes your problem please consider closing this one and thumbs upping the other issue to help us prioritize it. Thank you! Open similar issues:
|
I have updated the repro to include both a |
I've done some digging on this and tracked the bug down to this section of code:
If both diff values are zero (as they are when the swipeview is tapped),
will return false. Adding
before the first section would resolve this issue. I have already tested this in my own project and verified that it resolves this issue. I may have some time tomorrow to submit a pr here |
Description
When a
SwipeView
is swiped, it can be tapped to close. However, this tap will also activateTapGestureRecognizer
s attached to theContent
viewsPlease note that although I have not tested other .NET MAUI versions, this bug is present in Xamarin.Forms. I have recently revisited a project based upon Xamarin.Forms 5 that includes the workaround stated below.
Steps to Reproduce
Label
left or rightTapGestureRecognizer
attached to theLabel
has been activated.Link to public reproduction project repository
https://github.com/sjordanGSS/swipeview-content-gesture
Version with bug
8.0.70 SR7, 8.0.61 SR6
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
Tested and reproduced on Android 7.1, 10, 11, 14
Did you find any workaround?
Code can be added to
SwipeView.SwipeEnded
andSwipeViewItem.Tapped
to set theContent
'sIsEnabled
to false while the view is swiped, however this will malfunction if theSwipeView
is closed with a long press.I tried wrapping the
Label
in aContentView
to see if this issue was exclusive to the immediate children of theSwipeView
, however it had no effect.Relevant log output
No response
The text was updated successfully, but these errors were encountered: