Skip to content

HandleOnBackPressed Fails to Trigger with Modal Open on Android #39559

Done

Description

@JordanBird

Description

While an app running .NET 10 MAUI on Android has a modal open, the hardware back button fails to trigger HandleOnBackPressed when configured.

Without a modal open this is triggered as expected.

Originally reported here, but the issue was closed while it is still present: #30265
Potentially relevant: #34379

Steps to Reproduce

  1. Create a new MAUI Project
  2. Configure OnBackPressedCallback class with HandleOnBackPressed implemented to show output or add a breakpoint.
  3. Add code to show a page as a modal such as 'await Shell.Current.Navigation.PushModalAsync(new ReproductionModal());'
  4. Run application
  5. Use hardware or simulator back button

Expected Behavior:
The log appears in console or the breakpoint is hit.

Actual Behavior:
No log appears and the break point is not hit unless a modal is not currently open.

Link to public reproduction project repository

https://github.com/JordanBird/reproductions/tree/dotnet-maui-back-android-modal

Version with bug

10.0.100

Is this a regression from previous behavior?

Yes, this used to work in .NET MAUI

Last version that worked well

Unknown/Other

Affected platforms

Android

Affected platform versions

Android 16

Did you find any workaround?

No workaround found.

Relevant log output

Activity

  1. added
    t/bug
    on Oct 22, 2026
  2. MihuBot commented on Oct 22, 2026

    @MihuBot

    I'm a bot. Here is a possible related and/or duplicate issue (I may be wrong):

  3. JordanBird commented on Oct 22, 2026

    @JordanBird
    Author

    I'm a bot. Here is a possible related and/or duplicate issue (I may be wrong):

    Looks to be relevant.

  4. NafeelaNazhir commented on Oct 23, 2026

    @NafeelaNazhir
    Contributor

    This issue has been validated in Visual Studio Code 1.143.0 with .NET MAUI versions 10.0.0 and 10.0.120. It can be reproduced on the Android platform

    Screen.Recording.2026-10-23.at.10.17.59.AM.mov
  5. added
    s/verified
    s/triaged
    on Oct 23, 2026
  6. added
    partner/syncfusion
    on Oct 27, 2026
  7. added a commit that references this issue on Nov 26, 2026
    026eba9
  8. kubaflo commented on Nov 29, 2026

    @kubaflo
    Contributor

    Thanks @JordanBird for reporting the Android hardware back failing to run your Activity callback while a modal is open. The fix was merged in #40621. If you still see it on the latest .NET MAUI version that includes the fix, please open a new issue with a small reproduction and your device and MAUI versions.

    Disclosure: this comment was generated with AI assistance.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    area-controls-modalpartner/syncfusionplatform/androids/triageds/verifiedt/bug

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions