-
Notifications
You must be signed in to change notification settings - Fork 487
Closed
Labels
Description
Is there an existing issue for this?
- I have searched the existing issues
Did you read the "Reporting a bug" section on Contributing file?
- I have read the "Reporting a bug" section on Contributing file: https://github.com/CommunityToolkit/Maui/blob/main/CONTRIBUTING.md#reporting-a-bug
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
- Clone this repo: https://github.com/dsarbut/PopupBug.git
- Open the solution, run it on Windows, Click the "Show Modal Page" button.
- Examine the output window. You should see:
Showing Modal Page!
Showing popup! - Close the popup, either by pressing the "Close button" or by clicking outside.
- 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.40Anything else?
No response
Reactions are currently unavailable