Maui: [Bug] In the Windows platform, Popup gets dismissed automatically when the context is switched to a different Window and returned

Description

In the Windows platform, Popup gets dismissed automatically when the context is switched to a different Window and returned

Stack Trace

Link to Reproduction Sample

Steps to Reproduce

  1. Add a Popup control in the new or existing .NET MAUI App
  2. Add an option to invoke the Popup
  3. Set Windows as the Target platform, build and run the app
  4. Invoke the popup and switch the context to a different Window and come back, the Popup in this application gets dismissed automatically

Expected Behavior

The Popup should stay open if the CanBeDismissedByTappingOutsideOfPopup property is set to False.

Actual Behavior

Popup gets closed automatically, not even able to Debug it. Switching to VS closes the popup.

Basic Information

  • Version with issue: v1.0.0
  • Last known good version: NA
  • IDE: VS2022 17.3.0 Preview 1.1
  • Platform Target Frameworks:
    • iOS:
    • Android:
    • UWP:
    • WinUI: net6.0-windows10.0.19041.0 running on Windows 11 OS
  • Android Support Library Version:
  • Nuget Packages:
  • Affected Devices:

Workaround

Nope

Reproduction imagery

About this issue

  • Original URL
  • State: closed
  • Created 2 years ago
  • Comments: 16 (6 by maintainers)

Most upvoted comments

I know you folks contribute to this toolkit out of your own interest and I do appreciate that.

So I’ll try to check over the weekend on whether I can extend a helping hand on this.

I really wish GitHub would show similar issues when opening a new issue to help here.

I think this topic is certainly something that we should continue to discuss. I understand that with the current implementation of using a Flyout that there isn’t any issue with how we are using that control. I do agree with @egvijayanand that a Popup should not auto dismiss itself in the manner that we are talking. If I present a Popup I expect it to only be dismissed by the user clicking outside (if allowed) or if it is programmatically closed (timeout or button tap/click).

There is no quick fix or action to be done but I would like to vote that we either reopen this issue or open a discussion (if one isn’t already open) to discuss this functionality further.