From 22fdb8bb05c61809b42ac64943c920c4ecc98715 Mon Sep 17 00:00:00 2001 From: Valentin Shergin Date: Thu, 5 Mar 2020 17:25:58 -0800 Subject: [PATCH] Fabric: Fixed UI jankiness caused by changes in flattening Summary: It's not clear why exactly but seems in some cases, for some views the hierarchical relationship between views is required (when it should not be conceptually). Turning this feature off for Android for now. Changelog: [Internal] Fabric-specific internal change. Reviewed By: JoshuaGross Differential Revision: D20292833 fbshipit-source-id: 1aab8468cedeb5c1440a95944be7eca3216e0db0 --- ReactCommon/fabric/components/view/ViewShadowNode.cpp | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/ReactCommon/fabric/components/view/ViewShadowNode.cpp b/ReactCommon/fabric/components/view/ViewShadowNode.cpp index 19fcbebd90e..0fa4674d00e 100644 --- a/ReactCommon/fabric/components/view/ViewShadowNode.cpp +++ b/ReactCommon/fabric/components/view/ViewShadowNode.cpp @@ -53,6 +53,13 @@ void ViewShadowNode::updateTraits() { formsView = formsView || formsStackingContext; +#ifdef ANDROID + // Force `formsStackingContext` trait for nodes which have . + // TODO: T63560216 Investigate why/how `formsView` entangled with + // `formsStackingContext`. + formsStackingContext = formsStackingContext || formsView; +#endif + if (formsView) { traits_.set(ShadowNodeTraits::Trait::FormsView); } else {