Maui icon indicating copy to clipboard operation
Maui copied to clipboard

[Bug] Code never returns from ShowPopupAsync if Window resized

Open NickDevoctomy opened this issue 3 years ago • 1 comments

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

  1. Create simple page with single button and ViewModel
  2. Create simple popup
  3. In button command delegate in view model, call

await Application.Current.MainPage.ShowPopupAsync(new SimplePopup());

  1. Popup should appear
  2. Resize window
  3. Popup disappears (expected behaviour)
  4. 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 avatar Jul 27 '22 18:07 NickDevoctomy

@NickDevoctomy Could you attach a small repro?

pictos avatar Aug 14 '22 00:08 pictos

Closing this issue because we don't get any response.

pictos avatar Oct 15 '22 23:10 pictos