Maui
Maui copied to clipboard
[Bug] Code never returns from ShowPopupAsync if Window resized
Description
If you call ShowPopupAsync from a button command and then resize the window, the code never returns and the button remains unusable.
Steps to Reproduce
- Create simple page with single button and ViewModel
- Create simple popup
- In button command delegate in view model, call
await Application.Current.MainPage.ShowPopupAsync(new SimplePopup());
- Popup should appear
- Resize window
- Popup disappears (expected behaviour)
- Button remains disabled and cannot be clicked as code never returned from command delegate and is still on "await" line
Expected Behavior
Code to return on resize, possibly via CancellationToken usage. As a result, the button should also re-enable and be able to be pressed again.
Actual Behavior
Code doesn't return, leaving thread running and button disabled, preventing further presses.
Basic Information
- Version with issue: 1.2.0
- IDE: VS 2022 17.3 Preview 5
- Platform Target Frameworks:
- UWP: 19041
- Nuget Packages: CommunityToolkit.Mvvm 8 preview 4
@NickDevoctomy Could you attach a small repro?
Closing this issue because we don't get any response.