Fix: Ensure forms stacking context for events

Summary: Changelog: [Internal] - If any relevant view events (pointer, touch events, gesture responder, etc.) are declared on view, then the view must form stacking context. We need this change for pointer events specifically to determine whether we've entered/exited a view

Reviewed By: vincentriemer

Differential Revision: D37678352

fbshipit-source-id: 02641549ef608b1c9468ac693c7da629143212cb
This commit is contained in:
Luna Wei authored and Facebook GitHub Bot committed 2022-07-08 13:11:56 -07:00
1 parent d473881bd7
commit 1753e7697d
2 files changed
+2 -3

No files matched your search

@@ -70,7 +70,7 @@ void ViewShadowNode::initialize() noexcept {
(viewProps.zIndex.has_value() &&
viewProps.yogaStyle.positionType() != YGPositionTypeStatic) ||
viewProps.yogaStyle.display() == YGDisplayNone ||
viewProps.getClipsContentToBounds() ||
viewProps.getClipsContentToBounds() || viewProps.events.bits.any() ||
isColorMeaningful(viewProps.shadowColor) ||
viewProps.accessibilityElementsHidden ||
viewProps.accessibilityViewIsModal ||
@@ -84,7 +84,6 @@ void ViewShadowNode::initialize() noexcept {
bool formsView = formsStackingContext ||
isColorMeaningful(viewProps.backgroundColor) ||
isColorMeaningful(viewProps.foregroundColor) ||
viewProps.events.bits.any() ||
!(viewProps.yogaStyle.border() == YGStyle::Edges{}) ||
!viewProps.testId.empty();
@@ -80,7 +80,7 @@ function EventfulView(props: {|
.join(', ');
return (
<View ref={ref} {...listeners} {...restProps} collapsable={false}>
<View ref={ref} {...listeners} {...restProps}>
<View style={styles.row}>
<Text>
{props.name}, {tag}, {listeningTo}