-
Notifications
You must be signed in to change notification settings - Fork 1.9k
[iOS] OnBackButtonPressed not firing for Shell Navigation Bar button #34190
Copy link
Copy link
Closed
Copy link
Labels
area-controls-shellShell Navigation, Routes, Tabs, FlyoutShell Navigation, Routes, Tabs, Flyoutpartner/syncfusionIssues / PR's with Syncfusion collaborationIssues / PR's with Syncfusion collaborationplatform/iosplatform/macosmacOS / Mac CatalystmacOS / Mac Catalysts/triagedIssue has been reviewedIssue has been revieweds/verifiedVerified / Reproducible Issue ready for Engineering TriageVerified / Reproducible Issue ready for Engineering Triaget/bugSomething isn't workingSomething isn't working
Milestone
Metadata
Metadata
Assignees
Labels
area-controls-shellShell Navigation, Routes, Tabs, FlyoutShell Navigation, Routes, Tabs, Flyoutpartner/syncfusionIssues / PR's with Syncfusion collaborationIssues / PR's with Syncfusion collaborationplatform/iosplatform/macosmacOS / Mac CatalystmacOS / Mac Catalysts/triagedIssue has been reviewedIssue has been revieweds/verifiedVerified / Reproducible Issue ready for Engineering TriageVerified / Reproducible Issue ready for Engineering Triaget/bugSomething isn't workingSomething isn't working
Type
Fields
Give feedbackNo fields configured for issues without a type.
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
Relevant log output