SIGN IN SIGN UP
facebook / react-native UNCLAIMED

A framework for building native applications using React

0 0 0 C++

Sync clipChildren with overflow: hidden (#55368)

Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/55368

Changelog: [Internal]

We found an issue (T253147322) in the LivingRoom top bar where a full-screen OCPanel within a parent with `overflow: hidden` occludes content outside the parent (see [code](https://www.internalfb.com/code/fbsource/[753feac76cb1]/arvr/js/apps/LivingRoom/src/ReactNative/App/HTV/Shared/Toolbar/LivingRoomToolbar.react.js?lines=85-96)).

This change adds a feature flag `enableClipChildrenForOverflowHidden` that, when enabled, sets `clipChildren = true` whenever `overflow: hidden` is set. This makes `TouchTargetHelper` also reject touches on children outside the parent's bounds (see [code](https://www.internalfb.com/code/fbsource/[753feac76cb1]/xplat/js/react-native-github/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/uimanager/TouchTargetHelper.kt?lines=211-213)), aligning hit testing behavior with visual rendering.

The fix is gated behind a feature flag to allow gradual rollout and prevent potential regressions in apps that may rely on the current behavior.

Reviewed By: Abbondanzo

Differential Revision: D91775635

fbshipit-source-id: a1bf9bbd7ea9ff71ac4e7cf407b6d5328272bf00
F
Fabrizio Cucci committed
1c8f297d550bfa097790fa1ba44cb3925861e06e
Parent: a640790
Committed by meta-codesync[bot] <215208954+meta-codesync[bot]@users.noreply.github.com> on 2/2/2026, 12:28:39 PM