Description
When a SwipeView is swiped, it can be tapped to close. However, this tap will also activate TapGestureRecognizers attached to the Content views
Please 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
- Download and run the reproduction
- Swipe the
Label left or right
- Tap to close
- The text "content tapped" will be printed to the debug output, to indicate that the
TapGestureRecognizer attached to the Label 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 and SwipeViewItem.Tapped to set the Content's IsEnabled to false while the view is swiped, however this will malfunction if the SwipeView is closed with a long press.
I tried wrapping the Label in a ContentView to see if this issue was exclusive to the immediate children of the SwipeView, however it had no effect.
Relevant log output
No response
Description
When a
SwipeViewis swiped, it can be tapped to close. However, this tap will also activateTapGestureRecognizers attached to theContentviewsPlease 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
Labelleft or rightTapGestureRecognizerattached to theLabelhas 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.SwipeEndedandSwipeViewItem.Tappedto set theContent'sIsEnabledto false while the view is swiped, however this will malfunction if theSwipeViewis closed with a long press.I tried wrapping the
Labelin aContentViewto see if this issue was exclusive to the immediate children of theSwipeView, however it had no effect.Relevant log output
No response