You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[Android] Shell and Page.OnBackButtonPressed() not called on root page of Shell tab (Release build) #37657
In 10.0.90, Shell.OnBackButtonPressed() is not called when the current page is the root page of a Shell tab on Android. This only happens in Release builds - it works fine in Debug.
Steps to Reproduce
Create a Shell app with multiple tabs.
Override Shell.OnBackButtonPressed() so it returns true. eg:
public partial class AppShell : Shell
{
protected override bool OnBackButtonPressed()
{
return true;
}
}
Deploy a Release build to Android.
Navigate to the root page of a non-home tab.
Press the device Back button.
Expected
Shell.OnBackButtonPressed() is called and the event is handled.
Actual
Shell.OnBackButtonPressed() is not called.
Note that the same applies to Page.OnBackButtonPressed().
Link to public reproduction project repository
No response
Version with bug
10.0.90
Is this a regression from previous behavior?
Yes, this used to work in .NET MAUI
Last version that worked well
10.0.60
Affected platforms
Android
Affected platform versions
No response
Did you find any workaround?
Registering an Android OnBackPressedCallback in MainActivity appears to fix things even if the callback function does nothing except pass the call on to Android. eg.
protected override void OnCreate(Bundle? savedInstanceState)
{
base.OnCreate(savedInstanceState);
OnBackPressedDispatcher.AddCallback(
this,
new DummyBackPressedCallback());
}
private class DummyBackPressedCallback : OnBackPressedCallback
{
public DummyBackPressedCallback() : base(true)
{
}
public override void HandleOnBackPressed()
{
Enabled = false;
Platform.CurrentActivity?.OnBackPressed();
Enabled = true;
}
}
This issue has been validated in Visual Studio Code 1.132.0 with .NET MAUI versions 10.0.60, 10.0.70 and 10.0.90. It can be reproduced on the Android platform from 10.0.70.
Note: Issue reproduced in both debug and release mode in Android Api 36 pixel9.
Issue not reproduced in both debug and release mode in Android Api 30 nexus 5X.
Thank you for the report and the investigation details. We are closing this as completed: Android back-button routing now honors application Shell and Page overrides before root-navigation checks, and the contributor confirmed the reported tab-root scenario is fixed.
Supporting evidence: #37709 (merged into inflight/current).
This records the merged source change; it does not imply that the fix is present in every released .NET MAUI package.
If you can still reproduce the reported behavior in a build that includes the linked change, please comment here with the exact version and reproduction details so we can reopen and investigate. The existing reproduction and discussion remain available; a new issue is not required.
Activity
NafeelaNazhir commentedon Aug 20, 2026
This issue has been validated in Visual Studio Code 1.132.0 with .NET MAUI versions 10.0.60, 10.0.70 and 10.0.90. It can be reproduced on the Android platform from 10.0.70.
Note: Issue reproduced in both debug and release mode in Android Api 36 pixel9.
Issue not reproduced in both debug and release mode in Android Api 30 nexus 5X.
Issue37657.zip
Screen.Recording.2026-08-20.at.11.32.02.AM.mov
Screen.Recording.2026-08-20.at.12.05.32.PM.mov
HarishwaranVijayakumar commentedon Aug 26, 2026
This issue was fixed with this PR-37709. I have attached video reference below.
37657_After.1.mp4
Publish reproduction evidence for #37657 on android
Publish reproduction evidence for #37657 on android
Publish reproduction evidence for #37657 on android
[release/10.0.1xx-sr10] Integrate .NET MAUI 10.0.101 VS insertion pay…
kubaflo commentedon Oct 10, 2026
Thank you for the report and the investigation details. We are closing this as completed: Android back-button routing now honors application Shell and Page overrides before root-navigation checks, and the contributor confirmed the reported tab-root scenario is fixed.
Supporting evidence: #37709 (merged into
inflight/current).This records the merged source change; it does not imply that the fix is present in every released .NET MAUI package.
If you can still reproduce the reported behavior in a build that includes the linked change, please comment here with the exact version and reproduction details so we can reopen and investigate. The existing reproduction and discussion remain available; a new issue is not required.