Skip to content
This repository has been archived by the owner on May 1, 2024. It is now read-only.

[Bug] Popup with "IsLightDismissEnabled" turned off closes when window focus is lost #1990

Open
Aculeo opened this issue Oct 13, 2023 · 0 comments
Labels
bug Something isn't working. Breaky break.

Comments

@Aculeo
Copy link

Aculeo commented Oct 13, 2023

I've noticed that a Popup closes when the window focus is lost. This is even when IsLightDismissEnabled is toggled off. In our use cases the popup should remain visible until the user actively dismisses it by confirming or cancelling. With the current behavior, the user cannot switch to a different window, copy something, and then return back to the application and paste the content into the popup.

Link to Reproduction Sample

Code to show popup:

var popup = new MyPopup();
Application.Current.MainPage.Navigation.ShowPopup(popup);

Popup Code:

<?xml version="1.0" encoding="UTF-8"?>
<views:Popup xmlns="http://xamarin.com/schemas/2014/forms" 
             xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
             xmlns:views="http://xamarin.com/schemas/2020/toolkit"
             IsLightDismissEnabled="False"
             x:Class="PopupTest.MyPopup">
  <views:Popup.Content>
      <StackLayout>
          <Label Text="Hello Xamarin.Forms!" />
      </StackLayout>
  </views:Popup.Content>
</views:Popup>

I would like to provide a reproduction sample, but, alas, the company firewall makes this once again impossible 😑

Steps to Reproduce

  1. Open the popup
  2. Click somewhere outside the window to make it loose focus

Expected Behavior

Popup should remain visible.

Actual Behavior

Popup is closed.

Basic Information

  • Version with issue: 2.0.6
  • Last known good version: Probably none
  • IDE: Visual Studio 2022
  • Platform Target Frameworks:
    • UWP: Target Version 22H2 / 22621, Min Version 2004 / 19041
  • Affected Devices: Windows 10 device
@Aculeo Aculeo added the bug Something isn't working. Breaky break. label Oct 13, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Something isn't working. Breaky break.
Projects
None yet
Development

No branches or pull requests

1 participant