You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have a service that handles showing popup dialogs using Prism's dialog service.
When I navigate to a page via Absolute Navigation, then trigger the popups from my custom popup service, the Prism Dialogs stop working. As far as I can tell, the ShowDialogAsync() call never seems to return.
Popups work just fine before any Absolute Navigation. I even tried doing absolute navigation back to the same page I was on and opening popups after, the issue still occurs once the Absolute Navigation happens.
Ensure prism.ConfigureMopupDialogs() is NOT set in your MauiProgram.cs when doing UsePrism(...).
Navigate to a page with NavigationBuilder and include the UseAbsoluteNavigation() function. Note: CreateWindow can use Absolute Navigation without this issue occurring. var navResult = await _navigationService.CreateBuilder() .UseAbsoluteNavigation() .AddNavigationPage() .AddSegment<SecondPageViewModel>() .NavigateAsync();
On the page that was navigated to, call the popup from a Service and not directly from a ViewModel.
When I do the above, the popup does not appear and the code never seems to return from the ShowDialogAsync() call.
Platform with bug
.NET MAUI
Affected platforms
Android
Did you find any workaround?
Utilizing Mopup Dialogs with prism.ConfigureMopupDialogs() appears to work in this scenario.
Calling the Popup from the ViewModel directly instead of a Service will also avoid the issue.
Relevant log output
No response
The text was updated successfully, but these errors were encountered:
Description
I have a service that handles showing popup dialogs using Prism's dialog service.
When I navigate to a page via Absolute Navigation, then trigger the popups from my custom popup service, the Prism Dialogs stop working. As far as I can tell, the ShowDialogAsync() call never seems to return.
Popups work just fine before any Absolute Navigation. I even tried doing absolute navigation back to the same page I was on and opening popups after, the issue still occurs once the Absolute Navigation happens.
Note: I found that if I set prism.ConfigureMopupDialogs(), then it works fine. You can control that with an ifdef I added in the MauiProgram.cs.
Steps to Reproduce
You can follow the steps in this video: https://github.com/user-attachments/assets/bba1b4bd-a7e7-454b-8f44-7e915a1b77ff
It shows popups being called directly from the viewmodel (LOCAL button) and from my service (SERVICE button).
The steps for reproducing are also below:
var navResult = await _navigationService.CreateBuilder() .UseAbsoluteNavigation() .AddNavigationPage() .AddSegment<SecondPageViewModel>() .NavigateAsync();
When I do the above, the popup does not appear and the code never seems to return from the ShowDialogAsync() call.
Platform with bug
.NET MAUI
Affected platforms
Android
Did you find any workaround?
Relevant log output
No response
The text was updated successfully, but these errors were encountered: