microspaze / RGPopup.Maui

Popup controls for .NET MAUI migrated from Rg.Plugins.Popup for Xamarin with some fixes.
MIT License
31 stars 5 forks source link

PopUp not showing and not responding #18

Open s3ttingQ opened 1 month ago

s3ttingQ commented 1 month ago

First time the problem was a simple PopUp was just not showing and then my app becomes unresponsive ( was fixed just by updating from version 1.0.7 to 1.1.2 of the plugin ).

Then I found another popup while testing the app which opens but buttons are not responsive and the app freezes. Neither rolling back to 1.0.7 or 1.1.2 fixes the issue.

`` if (!await new AlertPopUp("Discover failed", $"The scanned module could not be discovered.{Environment.NewLine}{Environment.NewLine}Do you want to try again?", "Yes", "No").ShowAsync().ConfigureAwait(false)) { BLEAdapter.DeviceDiscovered -= onDiscover;

return null;

} ``

It is stuck on await. Will upload a video if needed. Can someone has any idea what is happening here? Thank you !

microspaze commented 1 month ago

Can you provide a demo project for this issue? Then I can take a deeper look on it.

s3ttingQ commented 1 month ago

Hey @microspaze This is the demo I made : https://github.com/s3ttingQ/MauiTests

In the BLEManager.cs search for "TODO" to find the exact place where the problem is happening. Thank you !

microspaze commented 4 weeks ago

It takes me 4 hours to find the root cause. Finally I found that your code disabled the whole main page and then displays popup. The popup page will auto set the current main page as its parent. So your code freezes the popup page at the same time and popup content can not be clickable.

1718085908591

s3ttingQ commented 4 weeks ago

You are a life saver man. Thank you very much! Have a virtual beer from me :D

Can you explain this for me? This was a Xamarin project which I am migrating to Maui. In Xamarin it was working. There was a change in Maui behaviour I guess or plugin ? Then if so, there is no need to dissable or enable the main page almost anywhere in the project because it's auto handled ? And again thank you very much, I've been searching for the problem for two days..

microspaze commented 4 weeks ago

Setting Popup page's parent to current main page is the same behaviour in both Xamarin and MAUI. But Maui may change something.

andersondamasio commented 2 weeks ago

I have a problem with pop-ups that no longer open. It happens from version 1.0.9 onwards. In this case, I'm still using version 1.0.8 until I check what happens or send an example for you to check.

microspaze commented 2 weeks ago

@andersondamasio You can upload an example project and I will try to fix the issue.