Skip to content

[BUG] Popup shown from modal page blocks modal stack after close. #2557

Closed

Description

@dsarbut

Is there an existing issue for this?

  • I have searched the existing issues

Did you read the "Reporting a bug" section on Contributing file?

Current Behavior

Showing a popup from a modal page and than closing it, causes the modal stack to be blocked and the app to hang when trying to pop the modal page.

Expected Behavior

Popping the modal page (await Navigation.PopModalAsync) should not hang.

Steps To Reproduce

  1. Clone this repo: https://github.com/dsarbut/PopupBug.git
  2. Open the solution, run it on Windows, Click the "Show Modal Page" button.
  3. Examine the output window. You should see:
    Showing Modal Page!
    Showing popup!
  4. Close the popup, either by pressing the "Close button" or by clicking outside.
  5. Examine the output window. You should see:
    Popup closed! Popping modal page.

You should also see:
Showing Main Page again., but this message is not present because Navigation.PopModalAsync hangs.

Code snippet:
` var modalPage = new ModalPage();

Debug.WriteLine("Showing Modal Page!");
await Navigation.PushModalAsync(modalPage);
Debug.WriteLine("Showing popup!");
await modalPage.ShowPopupAsync(new APopup());
Debug.WriteLine("Popup closed! Popping modal page.");
await Navigation.PopModalAsync();
Debug.WriteLine("Showing Main Page again.");`

Link to public reproduction project repository

https://github.com/dsarbut/PopupBug.git

Environment

- .NET MAUI CommunityToolkit: 11.1.0
- OS: Windows
- .NET MAUI: 9.0.40

Anything else?

No response

Activity

  1. RobertStefancic commented on Mar 3, 2025

    @RobertStefancic

    This is a blocking issue for us, and it occurs on previous .NET MAUI CommunityToolkit (>= 11.0.0) as well.

  2. locked and limited conversation to collaborators on May 28, 2025
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

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions