Skip to content

Commit 845c2da

Browse files
committed
fix(dialogs,ios): better choosing of the right controller to show in
1 parent c0a8927 commit 845c2da

File tree

1 file changed

+8
-3
lines changed

1 file changed

+8
-3
lines changed

src/dialogs/dialogs.ios.ts

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -576,12 +576,17 @@ function showUIAlertController(alertController: MDCAlertController, options: Dia
576576
}
577577
}
578578

579-
let currentView = getCurrentPage() || Application.getRootView();
580-
579+
let rootView = Application.getRootView();
580+
if (rootView.parent) {
581+
rootView = rootView.parent as any;
582+
}
583+
let currentView = getCurrentPage() || rootView;
581584
if (currentView) {
582585
currentView = currentView.modal || currentView;
583-
584586
let viewController = currentView.viewController;
587+
if (!viewController.presentedViewController && rootView.viewController.presentedViewController) {
588+
viewController = rootView.viewController.presentedViewController;
589+
}
585590

586591
while (viewController.presentedViewController) {
587592
while (

0 commit comments

Comments
 (0)