Skip to content

feat(modals): Enable modal dialog chaining in IOS #6637

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

Merged
merged 4 commits into from
Nov 30, 2018
Merged

Conversation

vakrilov
Copy link
Contributor

What is the current behavior?

The closeCallback for modals in IOS is fired before the dialog is closed. If you try to open another dialog in the callback - it fails because the previous dialog is still showing.

What is the new behavior?

The closeCallback is fired after the dialog is closed - in the completion callback of dismissViewControllerAnimatedCompletion.

e2e test needed: There is a Login (second modal in cb) button in the modal-view page in the ui-tests-app. It will open a modal and on its closeCallback it will open a second one.

Fixes #5744
This PR is followup of #6370

@dtopuzov
Copy link
Contributor

test

@dtopuzov dtopuzov merged commit 64bccb9 into master Nov 30, 2018
@ghost ghost removed the in progress label Nov 30, 2018
dtopuzov added a commit to NativeScript/functional-tests that referenced this pull request Nov 30, 2018
@manoldonev manoldonev deleted the async-modals branch March 22, 2019 09:38
@two-bridges
Copy link

This bug (#5744) is occurring for me in tns 5.3.3, nativescript-angular 6.2.

Upon calling (<ModalDialogParams>this.params).closeCallback(), the return promise is resolved too soon such that a subsequent modal popup fails with the same error as #5744:

ViewHierarchy: Parent is already presenting view controller. Close the current modal page before showing another one!

@lock
Copy link

lock bot commented May 5, 2020

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 May 5, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

iOS: issue when trying to chain modal pages within promise
6 participants