fix(ios): allow navigationFrom event for deep navigation within modal frame (#9187)

This commit is contained in:
Martin Guillon
2021-02-05 20:26:59 +01:00
committed by GitHub
parent 4945702620
commit 8f1455eef7

View File

@ -214,7 +214,7 @@ class UIViewControllerImpl extends UIViewController {
// or because we are closing a modal page,
// or because we are in tab and another controller is selected.
const tab = this.tabBarController;
if (owner.onNavigatingFrom && !owner._presentedViewController && !this.presentingViewController && frame && frame.currentPage === owner) {
if (owner.onNavigatingFrom && !owner._presentedViewController && frame && (!this.presentingViewController || frame.backStack.length > 0) && frame.currentPage === owner) {
const willSelectViewController = tab && (<any>tab)._willSelectViewController;
if (!willSelectViewController || willSelectViewController === tab.selectedViewController) {
const isBack = isBackNavigationFrom(this, owner);