Skip to content

Simplify ScrollView responder logic - #2940

Merged
zoontek merged 2 commits into
masterfrom
simplify-scrollview-responder
Oct 30, 2026
Merged

zoontek merged 2 commits into
masterfrom
simplify-scrollview-responder

Conversation

@zoontek

@zoontek zoontek commented Oct 29, 2026

Copy link
Copy Markdown
Collaborator

Removes scroll responder code that was ported from React Native but never ran on web. Momentum, drag, and keyboard events are not emitted on web, so their handlers and the "is animating" check had no effect.

Behavior changes:

  • New disableScrollViewPanResponder prop
  • onResponderTerminate now reaches the user's handler. Before, it was replaced with undefined.
  • scrollResponderZoomTo now throws, as on Android. Before, the invariant had a truthy string as its condition, so it never fired.
  • scrollResponderScrollTo(x, y, animated) is no longer supported. Use the options object. scrollTo still accepts the old signature.
  • additionalScrollOffset is now reset after scrolling to a focused input. Before, the code reset a misnamed field.

@zoontek
zoontek requested a review from Kudo October 29, 2026 16:51
@github-actions

github-actions Bot commented Oct 29, 2026 •

Copy link
Copy Markdown

Size Change: -361 B (-0.37%)

Total Size: 96.3 kB

📦 View Changed
Filename Size Change
packages/react-native-web/dist/exports/ScrollView/index.js 2 kB -361 B (-15.28%) 👏

compressed-size-action

@zoontek
zoontek force-pushed the simplify-scrollview-responder branch from 56a12ac to 933750c Compare October 30, 2026 09:47
@zoontek
zoontek merged commit c49c2da into master Oct 30, 2026
5 checks passed
@zoontek
zoontek deleted the simplify-scrollview-responder branch October 30, 2026 10:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants