File tree Expand file tree Collapse file tree 1 file changed +8
-1
lines changed Expand file tree Collapse file tree 1 file changed +8
-1
lines changed Original file line number Diff line number Diff line change @@ -68,13 +68,20 @@ export class SnackBar extends SnackBarBase {
68
68
currentView = currentView . modal || currentView ;
69
69
let viewController = currentView . viewController ;
70
70
while ( viewController . presentedViewController ) {
71
+ // if there is alertDialog presenting another controller let s find it.
72
+ // this can happen because if a page(controller) is showing an alert and we
73
+ // want to show a modal/other page over that page we need to use the
74
+ // current alert controller as presenting. So it will be the alertcontroller which
75
+ // will actually be the presenting controller
71
76
while (
72
77
viewController . presentedViewController instanceof UIAlertController ||
73
78
( viewController . presentedViewController [ 'isAlertController' ] && viewController . presentedViewController . presentedViewController )
74
79
) {
75
80
viewController = viewController . presentedViewController ;
76
81
}
77
- if ( viewController . presentedViewController instanceof UIAlertController || viewController . presentedViewController [ 'isAlertController' ] ) {
82
+ // we are now in a case where we have the parent presenting controller
83
+ // let ignore or not the presentedViewController (alert dialog, popover ...)
84
+ if ( viewController . presentedViewController instanceof UIAlertController || viewController . presentedViewController [ 'isAlertController' ] || options . iosIgnorePresentedViewController ?.( viewController . presentedViewController ) ) {
78
85
break ;
79
86
} else {
80
87
viewController = viewController . presentedViewController ;
You can’t perform that action at this time.
0 commit comments