[BUG] Popup Dialogs are hidden/covered by calling Page when called after returning from MAUI FilePicker
askariya opened this issue · comments
Description
If you are on Page A and call and await the FilePicker PickAsync function, and then open a Popup dialog, the Popup dialog will be covered by Page A. This is a big issue because while the popup is active in the background, we cannot interact with the app.
This does not seem to occur with the MAUI Community Toolkit Popups, so I think this must be an issue within Mopups or the Prism Dialog Popups.
You can find a sample app with a button that reproduces the issue here: https://github.com/askariya/MauiPrismMopupsSampleApp
Steps to Reproduce
- In a ViewModel, add a call to PickAsync() and follow it with a call to open a Popup Dialog:
var fileData = await FilePicker.PickAsync(); var popupResult = await _dialogService.ShowDialogAsync(nameof(PopupNotificationDialog));
- Trigger the above call (ex: with a button press).
- Select a file or back out such that the File Picker closes.
- You will see that the popup does not appear and instead the Page you called from does.
- If you repeat this in debug mode with breakpoints during the Popup initialization, you can very briefly see that the Popup does appear but is covered by the calling Page immediately.
Video:
https://github.com/PrismLibrary/Prism/assets/15271126/591d8f62-56b9-4211-91d6-6f87021b1111
Platform with bug
.NET MAUI
Affected platforms
Android
Did you find any workaround?
No workaround, only solution I could find for this is to use Maui Community Toolkit popups instead.
Relevant log output
No response
Thanks for creating a reproduction. This would seem to be an issue with Mopups though since we just use their API under the covers to launch the Dialog
Thanks for creating a reproduction. This would seem to be an issue with Mopups though since we just use their API under the covers to launch the Dialog
You're right, removing Prism from the equation results in the error still happening. I will open a Bug report on the Mopups repo.
Will you guys be able to merge in the changes to Prism Popups once it's fixed on the Mopups side?
I periodically update the dependencies like the Mopups plugin... but you can always take it as a top level dependency in your app if they push a fix and you're waiting on the Prism Plugin update
Good to know, thanks!