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

@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
Abbondanzo added a commit to Abbondanzo/react-native that referenced this pull request Jan 13, 2026
…#55097)

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
…#55097)

Summary:
Pull Request resolved: facebook#55097

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]

Reviewed By: mdvacca

Differential Revision: D90209679
@meta-codesync meta-codesync bot closed this in 77779f8 Jan 14, 2026
@facebook-github-bot facebook-github-bot added the Merged This PR has been merged. label Jan 14, 2026
@meta-codesync
Copy link

meta-codesync bot commented Jan 14, 2026

This pull request has been merged in 77779f8.

@react-native-bot
Copy link
Collaborator

This pull request was successfully merged by @Abbondanzo in 77779f8

When will my fix make it into a release? | How to file a pick request?

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 Merged This PR has been merged. meta-exported p: Facebook Partner: Facebook Partner

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants