Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
2 tasks done
dsarbut opened this issue Feb 26, 2025 · 1 comment · May be fixed by #1581
Open
2 tasks done

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

dsarbut opened this issue Feb 26, 2025 · 1 comment · May be fixed by #1581
Labels
bug Something isn't working unverified

Comments

@dsarbut
Copy link

dsarbut commented Feb 26, 2025

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

@dsarbut dsarbut added bug Something isn't working unverified labels Feb 26, 2025
@RobertStefancic
Copy link

RobertStefancic commented Mar 3, 2025

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

@TheCodeTraveler TheCodeTraveler linked a pull request Mar 3, 2025 that will close this issue
6 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working unverified
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants