-
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
Shell.BackButtonBehavior doesn't react to swipe back #15813
Comments
We've added this issue to our backlog, and we will work to address it as time and resources allow. If you have any additional information or questions about this issue, please leave a comment. For additional info about issue management, please read our Triage Process. |
@PureWeen could this still be something for .net8 GA or is it too late for that? |
Any update on this? This is causing big issues with Android UX for our .NET MAUI App. Android Backswipe wont interact with the shell. |
Description
In iOS and Android it's possible to change the behaviour of the back button via Shell.BackButtonBehavior. That works as intended, but if you use the back swipe gesture (from the edge of the screen towards the middle) it goes back in the navigation of the stack. There is also no way to change the behaviour from the ViewModel.
I'd propose to either handle the swipe back the same way a back button is being handled, make it optional to also attach the backbutton event to the swipe gesture or make it it's own bindable behaviour.
Swipe.Back.mp4
Steps to Reproduce
Link to public reproduction project repository
https://github.com/UkeHa/SwipeBackMaui/tree/master
Version with bug
7.0.86
Last version that worked well
Unknown/Other
Affected platforms
iOS, Android, I was not able test on other platforms
Affected platform versions
iOS 16.5.1, Android 13
Did you find any workaround?
It's possible to attach to the OnNavigating or OnNavigatingChanged event and trying to catch every possible way the navigation could be accessed or to override the INavigation, but both of these solutions are cumbersome to implement once you reuse a page in multiple instances and moves navigation into the view which isn't nice as well.
Relevant log output
No response
The text was updated successfully, but these errors were encountered: