Skip to content

Commit 26e30a5

Browse files
mdvaccafacebook-github-bot
authored andcommitted
Fix incorrect ViewFlattening for views that were listening for a JS event
Summary: This diff prevents view flattening for views that are handling some events in the JS side changelog: [internal] internal Reviewed By: javache Differential Revision: D32253124 fbshipit-source-id: acda2b12287f0a9c39a810b23a101765093ba217
1 parent 34a5158 commit 26e30a5

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

ReactCommon/react/renderer/components/view/ViewShadowNode.cpp

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -33,9 +33,10 @@ void ViewShadowNode::initialize() noexcept {
3333

3434
bool formsStackingContext = !viewProps.collapsable ||
3535
viewProps.pointerEvents == PointerEventsMode::None ||
36-
!viewProps.nativeId.empty() || viewProps.accessible ||
37-
viewProps.opacity != 1.0 || viewProps.transform != Transform{} ||
38-
viewProps.elevation != 0 ||
36+
viewProps.onLayout || viewProps.pointerEnter || viewProps.pointerLeave ||
37+
viewProps.pointerMove || !viewProps.nativeId.empty() ||
38+
viewProps.accessible || viewProps.opacity != 1.0 ||
39+
viewProps.transform != Transform{} || viewProps.elevation != 0 ||
3940
(viewProps.zIndex.has_value() &&
4041
viewProps.yogaStyle.positionType() != YGPositionTypeStatic) ||
4142
viewProps.yogaStyle.display() == YGDisplayNone ||

0 commit comments

Comments
 (0)