nativescript-cfalert-dialog icon indicating copy to clipboard operation
nativescript-cfalert-dialog copied to clipboard

Alert not shown on iOS on top of modal

Open flodaniel opened this issue 6 years ago • 1 comments

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 avatar Dec 27 '19 13:12 flodaniel

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

flodaniel avatar Dec 27 '19 14:12 flodaniel