Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Alert not shown on iOS on top of modal #32

Open
flodaniel opened this issue Dec 27, 2019 · 1 comment
Open

Alert not shown on iOS on top of modal #32

flodaniel opened this issue Dec 27, 2019 · 1 comment

Comments

@flodaniel
Copy link

With Nativescript 6.2 and iOS 13 the dialog will not show if it is opened on top of a modal.

I supect, that it opens behind the modal or not at all, but no error is thrown.

This is works as expected on Android.

@flodaniel
Copy link
Author

I found part of the issue:
The alerts are called with the wrong view controller as the viewcontroller is found with this line:
var viewController = frame.topmost().currentPage.ios;

However, this ignores modals. I am able to get (probably the right view controller:
var viewController = frame.topmost().currentPage.modal ? frame.topmost().currentPage.modal.ios : frame.topmost().currentPage.ios;

Sadly using this viewcontroller to call:
viewController.presentViewControllerAnimatedCompletion(_this._alertController, true, null);
leads to an exception saying that presentViewControllerAnimatedCompletion is undefinied. Something is wrong with the viewcontroller of the modal it seems

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant