Skip to content

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

Merged
dtopuzov merged 4 commits intomasterfrom
async-modals
Nov 30, 2018
Merged

feat(modals): Enable modal dialog chaining in IOS#6637
dtopuzov merged 4 commits intomasterfrom
async-modals

Conversation

@vakrilov
Copy link
Copy Markdown
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
Copy Markdown
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
Copy Markdown

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
Copy Markdown

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