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 2fdbe18d643..e96077eddec 100644 --- a/ReactAndroid/src/main/java/com/facebook/react/uimanager/TouchTargetHelper.java +++ b/ReactAndroid/src/main/java/com/facebook/react/uimanager/TouchTargetHelper.java @@ -178,17 +178,24 @@ public class TouchTargetHelper { // We prefer returning a child, so we check for a child that can handle the touch first if (allowReturnTouchTargetTypes.contains(TouchTargetReturnType.CHILD) && view instanceof ViewGroup) { - // We don't allow touches on views that are outside the bounds of an `overflow: hidden` and - // `overflow: scroll` View. - if (view instanceof ReactOverflowView) { - @Nullable String overflow = ((ReactOverflowView) view).getOverflow(); - if ((ViewProps.HIDDEN.equals(overflow) || ViewProps.SCROLL.equals(overflow)) - && !isTouchPointInView(eventCoords[0], eventCoords[1], view)) { + ViewGroup viewGroup = (ViewGroup) view; + if (!isTouchPointInView(eventCoords[0], eventCoords[1], view)) { + // We don't allow touches on views that are outside the bounds of an `overflow: hidden` and + // `overflow: scroll` View. + if (view instanceof ReactOverflowView) { + @Nullable String overflow = ((ReactOverflowView) view).getOverflow(); + if (ViewProps.HIDDEN.equals(overflow) || ViewProps.SCROLL.equals(overflow)) { + return null; + } + } + + // We don't allow touches on views that are outside the bounds and has clipChildren set to + // true. + if (viewGroup.getClipChildren()) { return null; } } - ViewGroup viewGroup = (ViewGroup) view; int childrenCount = viewGroup.getChildCount(); // Consider z-index when determining the touch target. ReactZIndexedViewGroup zIndexedViewGroup =