question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

PopupPage is still here, is only invisible

See original GitHub issue

Hello I have the following problem with latest version (1.1.4.168)

First of all I use a really simple LoadingPopupPage (PopupPage) that I show when I change page from the side menu of my app. I use this LoadingPage only for Android, I dont need for iOS (that runs more smoothly)

On ItemSelected on side list I simple do:

                    await Navigation.PushPopupAsync(loadingPage);

                    await this.root.NavigateAsync(((MenuItem)e.SelectedItem).MenuType).ContinueWith(
                        task =>
                       Navigation.PopAsync()
                   //  Navigation.PopAllPopupAsync(true)

                   // await Navigation.PopAllPopupAsync(true)
                    );

(I try PopPopupAsync too, and I try to call the async one, but the problem is still here)

root is my RootPage (:MasterDetailPage)

Till the previous version all working as expected, but now happen that:

  • the LoadingPopupPage is correctly removed from the view
  • the screen below (MenuType) is correctly displayed but the LoadingPopupPage is only transparent, but it is still over the right page. If I tap the screen is invoked:

protected override bool OnBackgroundClicked()

of the PopupPage

My LoadingPopupPage


<pages:PopupPage xmlns="http://xamarin.com/schemas/2014/forms" 
                 xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml" 
                 xmlns:pages="clr-namespace:Rg.Plugins.Popup.Pages;assembly=Rg.Plugins.Popup"       
                 xmlns:animations="clr-namespace:blabla;assembly=blabla"  
                 x:Class="blabla.Views.LoadingPopupPage" BackgroundColor="#eeeeee" CloseWhenBackgroundIsClicked="False">

  <ActivityIndicator 
    Color="#3885eb"
    BackgroundColor="Transparent"
    IsRunning="True"
    IsEnabled="True"
    VerticalOptions="Center"
        IsInNativeLayout="true"
        IsNativeStateConsistent="true"
    HorizontalOptions="Center"/>
</pages:PopupPage>


...
{
    public partial class LoadingPopupPage : PopupPage
    {
        public LoadingPopupPage()
        {
            InitializeComponent();
        }

        protected override void OnAppearing()
        {
            base.OnAppearing();
        }

        protected override void OnDisappearing()
        {
            base.OnDisappearing();
        }

        protected override bool OnBackgroundClicked()
        {
            return base.OnBackgroundClicked();
        }

        protected override bool OnBackButtonPressed()
        {
            return true;
        }
    }
}

Thanks

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:10 (6 by maintainers)

github_iconTop GitHub Comments

1reaction
EmilAlipievcommented, Nov 12, 2018

I tried your code wiht 1.1.4.168 but i cant reproduce your problem. for me first of all it is not clear what your exact problem is. because i understand 2 things

  1. although you wrote CloseWhenBackgroundIsClicked=“False”, OnBackgroundClicked is fired? if that is the problem yes it is fired but it doesnt close the popup. which is expected.
  2. if this is not the problem but although you close the popup (removed), it is still in the visual tree, not removed from memory but just set invisible when you try to tap on an item which is on the main layout, you actually tap on popup that fires OnBackgroundClicked. I cant reproduce 2nd one. popup is removed from the visual tree for me. And tapping on main layout never fires OnBackgroundClicked.

What confused me is that you say “LoadingPopupPage is only transparent” and your title says invisible. these 2 are totally 2 different things.

1reaction
paul-charltoncommented, Nov 12, 2018

I believe it was discovered by watching the override trigger on the popup page:

If I tap the screen is invoked: protected override bool OnBackgroundClicked()

of the PopupPage

Read more comments on GitHub >

github_iconTop Results From Across the Web

c# - Invisible opened popup
possible duplicate of Wpf Popup loses focus but stays opened. See the answer there: most likely the binding to IsOpen causes the StaysOpen ......
Read more >
Your Popup Is Not Displaying on Your Homepage (or ...
The Problem # You've got a popup that isn't displaying on one of your pages like your homepage. But you see that same...
Read more >
Pop Up not displaying - Need help - Bubble Forum
The sign up pop up cannot be shown as the element is not visible in the “show element” dropdown in the workflow builder....
Read more >
Popups and window methods
A popup window is one of the oldest methods to show additional document to ... The window is in the background, but still...
Read more >
How to remove this scam popup - page 2
The only way to remove this “notice” would be to ensure that all of your plugins/theme code do not rely on any old...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found