-
Notifications
You must be signed in to change notification settings - Fork 1.9k
[iOS] OnBackButtonPressed not firing for Shell Navigation Bar button #34190
Description
Description
In .NET 10, overriding OnBackButtonPressed does not capture the click event of the Shell Navigation Bar back button (the arrow in the top-left). While this has been a long-standing inconsistency, the issue is critical in iOS as it prevents intercepting navigation to update parent page states, even when system back gestures are changing.
Steps to Reproduce
Create a .NET 10 MAUI Shell app.
Navigate to a detail page using GoToAsync.
Override OnBackButtonPressed in the detail page.
Click the "Back" arrow in the Navigation Bar.
Expected Behavior: OnBackButtonPressed should be triggered (consistent with Windows platform behavior).
Actual Behavior: The method is not called. Only OnUnappearing is triggered.
Steps to Reproduce
Sample is in this PR link https://github.com/dotnet/maui/pull/33531/changes#diff-07225b8e09e958e5ffcc71bcf64d7a5cf89e00f95fe163ad3b337b59bfa8eb54
Link to public reproduction project repository
No response
Version with bug
Unknown/Other
Is this a regression from previous behavior?
Not sure, did not test other versions
Last version that worked well
Unknown/Other
Affected platforms
iOS, macOS
Affected platform versions
iOS 18, iOS 26, MacOS 26
Did you find any workaround?
No response