From 1b7921a6b5ec9829728ab2bb2c2842c523612379 Mon Sep 17 00:00:00 2001 From: Martin Yankov Date: Tue, 30 Oct 2018 10:15:30 +0200 Subject: [PATCH] fix-next(ios): handle nesting in proxyViewContainer ng --- tns-core-modules/ui/core/view/view.ios.ts | 3 ++- tns-core-modules/ui/page/page.ios.ts | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/tns-core-modules/ui/core/view/view.ios.ts b/tns-core-modules/ui/core/view/view.ios.ts index 327d748ede..8352f7ae6e 100644 --- a/tns-core-modules/ui/core/view/view.ios.ts +++ b/tns-core-modules/ui/core/view/view.ios.ts @@ -892,9 +892,10 @@ export namespace ios { let parent = tabView && tabView.parent; // Handle Angular scenario where TabView is in a ProxyViewContainer + // It is possible to wrap components in ProxyViewContainers indefinitely // Not using instanceof ProxyViewContainer to avoid circular dependency // TODO: Try moving UILayoutViewController out of view module - if (parent && !parent.nativeViewProtected) { + while (parent && !parent.nativeViewProtected) { parent = parent.parent; } diff --git a/tns-core-modules/ui/page/page.ios.ts b/tns-core-modules/ui/page/page.ios.ts index bf89a2cbc2..3ca6fe887e 100644 --- a/tns-core-modules/ui/page/page.ios.ts +++ b/tns-core-modules/ui/page/page.ios.ts @@ -227,9 +227,10 @@ class UIViewControllerImpl extends UIViewController { let frameParent = frame && frame.parent; // Handle Angular scenario where TabView is in a ProxyViewContainer + // It is possible to wrap components in ProxyViewContainers indefinitely // Not using instanceof ProxyViewContainer to avoid circular dependency // TODO: Try moving UIViewControllerImpl out of page module - if (frameParent && !frameParent.nativeViewProtected) { + while (frameParent && !frameParent.nativeViewProtected) { frameParent = frameParent.parent; }