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

fix(ios-dialogs): unable to show dialog from modal view without a page #5881

Merged
merged 2 commits into from
May 29, 2018

Conversation

ADjenkov
Copy link
Contributor

Fix #5879
The original problem occurred in an Angular app (Plugins team teamplate), that displays some dialogs inside modal view, bacause we are no longer wrapping modal view inside a Page in nativescript-angular@next.
This could also happen in a non Angular application (modal view without <Page>)

The solution is to search up in the hierarchy for a parent with UIViewController on which we should present the dialog.

Added test in modal-navigation app that opens dialog from modal view (with and without wrapping modal view content in Page)

@ADjenkov ADjenkov added the bug label May 29, 2018
@ADjenkov ADjenkov self-assigned this May 29, 2018
@ghost ghost added the in progress label May 29, 2018
view = currentPage.modal;

if (view.ios instanceof UIViewController) {
viewController = currentPage.modal.ios;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Shouldn't this be viewController = view.ios?

@ADjenkov ADjenkov merged commit e59d156 into master May 29, 2018
@ghost ghost removed bug in progress labels May 29, 2018
SvetoslavTsenov pushed a commit that referenced this pull request May 30, 2018
#5881)

* fix(ios-dialogs): unable to show dialog from modal view

* tests(modal-navigation): add test that opens dialog inside modal view
@TomasKypry
Copy link

TomasKypry commented Jun 8, 2018

Can you please describe how to fix it? I have a <Page> in my modal and dialogs.action() for example doesn't work on iOS.

@lock
Copy link

lock bot commented Aug 26, 2019

This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@lock lock bot locked and limited conversation to collaborators Aug 26, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[iOS] Unable to show dialog from modal view without a page
4 participants