SIGN IN SIGN UP
facebook / react-native UNCLAIMED

A framework for building native applications using React

Ensure active touches are swept before accepting a child native gesture (#52995)

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

Fabric retains views by ID when `JSTouchDispatcher` receives a touch event, but does not sweep these same views if a child native gesture is started between the `ACTION_DOWN` and `ACTION_UP` actions of the touch. As a result, we never end up calling into that view's manager's `onDropViewInstance` method and can't perform reliable teardown of the view since it's stuck in this "touched" state.

This is change adds a new condition to check if `JSTouchDispatcher` should sweep active touches when a child native gesture is started, and only applies the check to `ReactSurfaceView` to start. The check is also only enabled if the `sweepActiveTouchOnChildNativeGesturesAndroid` flag is set.

Changelog: [Internal]

Reviewed By: jehartzog

Differential Revision: D79230277

fbshipit-source-id: c15b888ec932319f1bda05b8ef5eec39e5d08710
P
Peter Abbondanzo committed
87749470ccf596c5b3bc06fe46ba3239b684fd1b
Parent: f2964e1
Committed by Facebook GitHub Bot <[email protected]> on 8/4/2025, 1:04:43 AM