Skip to content

Conversation

@Abbondanzo
Copy link
Contributor

Summary:
This change adds support for joystick and scrollwheel input devices to trigger pull-to-refresh in SwipeRefreshLayout.

Previously, ACTION_SCROLL events from non-touch input devices (joysticks, scrollwheels, etc.) were not being forwarded to child views wrapped in a SwipeRefreshLayout. This prevented child ScrollViews from receiving these events and handling pull-to-refresh gestures via nested scrolling.

The fix overrides dispatchGenericMotionEvent in ReactSwipeRefreshLayout to explicitly forward ACTION_SCROLL events to the first child view before falling back to the default behavior. This allows child views to process the scroll events and communicate with the SwipeRefreshLayout parent through the standard nested scrolling APIs.

Changelog: [Internal]

Differential Revision: D90209679

Summary:
This change adds support for joystick and scrollwheel input devices to trigger pull-to-refresh in SwipeRefreshLayout.

Previously, `ACTION_SCROLL` events from non-touch input devices (joysticks, scrollwheels, etc.) were not being forwarded to child views wrapped in a SwipeRefreshLayout. This prevented child ScrollViews from receiving these events and handling pull-to-refresh gestures via nested scrolling.

The fix overrides `dispatchGenericMotionEvent` in ReactSwipeRefreshLayout to explicitly forward `ACTION_SCROLL` events to the first child view before falling back to the default behavior. This allows child views to process the scroll events and communicate with the SwipeRefreshLayout parent through the standard nested scrolling APIs.

Changelog: [Internal]

Differential Revision: D90209679
@meta-codesync
Copy link

meta-codesync bot commented Jan 8, 2026

@Abbondanzo has exported this pull request. If you are a Meta employee, you can view the originating Diff in D90209679.

@meta-cla meta-cla bot added the CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. label Jan 8, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. fb-exported meta-exported p: Facebook Partner: Facebook Partner

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants