diff --git a/ReactAndroid/src/main/java/com/facebook/react/uimanager/TouchTargetHelper.java b/ReactAndroid/src/main/java/com/facebook/react/uimanager/TouchTargetHelper.java index 3298ca953..cee8c4ad7 100644 --- a/ReactAndroid/src/main/java/com/facebook/react/uimanager/TouchTargetHelper.java +++ b/ReactAndroid/src/main/java/com/facebook/react/uimanager/TouchTargetHelper.java @@ -177,7 +177,7 @@ public class TouchTargetHelper { if (child instanceof ReactHitSlopView && ((ReactHitSlopView) child).getHitSlopRect() != null) { Rect hitSlopRect = ((ReactHitSlopView) child).getHitSlopRect(); if ((localX >= -hitSlopRect.left && localX < (child.getRight() - child.getLeft()) + hitSlopRect.right) - && (localY >= -hitSlopRect.top && localY < (child.getBottom() - child.getTop()) + hitSlopRect.bottom)) { + && (localY >= -hitSlopRect.top && localY < (child.getBottom() - child.getTop()) + hitSlopRect.bottom)) { outLocalPoint.set(localX, localY); return true; } @@ -185,7 +185,7 @@ public class TouchTargetHelper { return false; } else { if ((localX >= 0 && localX < (child.getRight() - child.getLeft())) - && (localY >= 0 && localY < (child.getBottom() - child.getTop()))) { + && (localY >= 0 && localY < (child.getBottom() - child.getTop()))) { outLocalPoint.set(localX, localY); return true; } diff --git a/ReactCommon/fabric/components/view/ViewProps.cpp b/ReactCommon/fabric/components/view/ViewProps.cpp index df4dd58a2..db6b334a2 100644 --- a/ReactCommon/fabric/components/view/ViewProps.cpp +++ b/ReactCommon/fabric/components/view/ViewProps.cpp @@ -67,7 +67,12 @@ ViewProps::ViewProps(const ViewProps &sourceProps, const RawProps &rawProps) pointerEvents( convertRawProp(rawProps, "pointerEvents", sourceProps.pointerEvents)), hitSlop(convertRawProp(rawProps, "hitSlop", sourceProps.hitSlop)), - onLayout(convertRawProp(rawProps, "onLayout", sourceProps.onLayout)){}; + onLayout(convertRawProp(rawProps, "onLayout", sourceProps.onLayout)), + collapsable(convertRawProp( + rawProps, + "collapsable", + sourceProps.collapsable, + true)){}; #pragma mark - Convenience Methods diff --git a/ReactCommon/fabric/components/view/ViewProps.h b/ReactCommon/fabric/components/view/ViewProps.h index cfb28bc98..69d355e8e 100644 --- a/ReactCommon/fabric/components/view/ViewProps.h +++ b/ReactCommon/fabric/components/view/ViewProps.h @@ -58,6 +58,8 @@ class ViewProps : public Props, const EdgeInsets hitSlop{}; const bool onLayout{}; + const bool collapsable{true}; + #pragma mark - Convenience Methods BorderMetrics resolveBorderMetrics(bool isRTL) const;