Skip to content

Commit 60ac4e7

Browse files
slolammanoldonev
authored andcommitted
fix(iOS): Opening alert/confirm on top most of modal dialogs (#7982)
This is fix for the issue #6939 where alert() and confirm() does not work in a modal dialog if it's opened on top of an existing modal dialog.
1 parent bed0565 commit 60ac4e7

1 file changed

Lines changed: 5 additions & 0 deletions

File tree

nativescript-core/ui/dialogs/dialogs.ios.ts

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -205,6 +205,11 @@ function showUIAlertController(alertController: UIAlertController) {
205205
if (currentView) {
206206
currentView = currentView.modal || currentView;
207207

208+
//get to the top most view controller on the stack
209+
while (currentView && currentView.modal) {
210+
currentView = currentView.modal;
211+
}
212+
208213
let viewController: UIViewController = currentView.ios;
209214

210215
if (viewController.presentedViewController) {

0 commit comments

Comments
 (0)