[Bug Report]We still can trigger event behind a popup

Barry Wang 61 Reputation points
2019-11-14T07:01:36.773+00:00

We seems like found a bug from our app. Here are the reproduce steps:

  • Create a Page called PopPage, only set it's page's background to yellow,then set the grid:
  • On the calling page create a button and write it's event like this: private void Button_Click(object sender, RoutedEventArgs e)
    {
    PopPage popPage = new PopPage();
    Popup popup = new Popup();
    popup.Child = popPage;
    popup.IsOpen = true;
    } When the popup is out, you can find that you can still use VS to see the button although you cannot see it:
    alt text

In our project. We have lots of buttons behind the popup and we can still trigger the event from the behind. To solve this problem we find that we have to set the background of Grid. So why this happens? Is it a bug?

Universal Windows Platform (UWP)
{count} votes

2 answers

Sort by: Most helpful
  1. Roy Li - MSFT 31,526 Reputation points Microsoft Vendor
    2019-11-15T01:14:32.907+00:00

    Hello,​

    Welcome to our Microsoft Q&A platform!

    Thank you for reporting this here! We've reported this issue via our internal channel. It's glad to hear that you've found a way to overcome it and share it here.

    Besides, if you want to insert the xaml code, you could try to post it as a normal text.

    Thanks!


  2. Ronen Ariely 15,081 Reputation points
    2019-12-21T20:26:59.947+00:00

    Good day @Barry Wang ,

    This is not a bug but a design issue from your side. There is no reason to disable all entities once you use popup. It might fit your specific needs, but it is much simpler to control and disable entities then to redesign the app to have new entities for these who need them to continue to work.

    You should remember that popup does not necessarily cover the entire screen(s) and in many cases we want to work on the main page during the popup

    The solution is dimply disable the entities which you do not want the user to use while the popup is not up