fix: allow scrolling the ScrollView from draggable items on web - #574
Merged
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub. 1 Skipped Deployment
|
MatiPl01
force-pushed
the
fix/web-scroll-from-draggable-items
branch
2 times, most recently
from
June 27, 2026 23:04
c521016 to
d161bd7
Compare
On web the item gesture detectors set touch-action: none, which blocked scrolling the surrounding ScrollView when a gesture started over an item. Relax touch-action to the auto-scroll axis so the browser can scroll before a drag starts, and suppress native scroll only while an item is actively dragged so the relaxed touch-action does not steal the drag. Encapsulated behind platform-split files; no change on native.
MatiPl01
force-pushed
the
fix/web-scroll-from-draggable-items
branch
from
June 27, 2026 23:24
d161bd7 to
d545042
Compare
Removed comments about scroll axis usage in web.
MatiPl01
marked this pull request as ready for review
June 28, 2026 09:39
MatiPl01
pushed a commit
that referenced
this pull request
Jul 23, 2026
# [1.10.0](v1.9.4...v1.10.0) (2026-07-23) ### Bug Fixes * Add item zIndex preserving based on the order of items ([#534](#534)) ([fb0be4e](fb0be4e)), closes [#36877](https://github.com/MatiPl01/react-native-sortables/issues/36877) * allow scrolling the ScrollView from draggable items on web ([#574](#574)) ([74879ed](74879ed)), closes [#545](#545) * Balance onTouchesUp on Sortable.Touchable long press ([#594](#594)) ([f977567](f977567)) * Deduplicate expo example native modules for expo-doctor ([#590](#590)) ([e5af169](e5af169)), closes [#589](#589) * disable dragging for fixed-order and non-draggable handles ([#598](#598)) ([8ed2e81](8ed2e81)) * dragging stops after a screen is detached and re-attached (gesture-handler v3) ([#573](#573)) ([c70a14f](c70a14f)), closes [#349](#349) [react-native-gesture-handler#3560](https://github.com/react-native-gesture-handler/issues/3560) [#349](#349) [#349](#349) * Item can settle on another item's slot after a rapid re-order ([#591](#591)) ([9d63817](9d63817)), closes [#586](#586) * Item position drift on slow web container resize ([#562](#562)) ([8973115](8973115)) * Keep npm version from walking yarn workspaces during release ([#609](#609)) ([0d8d869](0d8d869)) * Keep Sortable.Grid measurements when revealed after react-freeze ([#572](#572)) ([609c73c](609c73c)), closes [#519](#519) [#36877](https://github.com/MatiPl01/react-native-sortables/issues/36877) * keep Sortable.Touchable onTouchesUp firing on web ([#596](#596)) ([8529fa8](8529fa8)), closes [#594](#594) * Keep Sortable.Touchable tap and long press working on teleported items ([#602](#602)) ([3efb111](3efb111)) * Keep teleported item in sync with collapsed content ([#595](#595)) ([1fbcf9e](1fbcf9e)) * New-Arch grid mount crash in the example and unrunnable expo example ([#589](#589)) ([01aa1a8](01aa1a8)) * Respect Sortable.Flex alignItems before items are measured ([#560](#560)) ([5c84117](5c84117)), closes [#258](#258) * Restore tap and long press on teleported items ([#599](#599)) ([e73117b](e73117b)) * Sortable.Touchable crash on gesture-handler v3 (onActivate not a worklet) ([#587](#587)) ([4b3007e](4b3007e)) * Support react-native-gesture-handler 3.x types ([#553](#553)) ([83754e0](83754e0)) * Support react-native-reanimated 4.5 / worklets 0.10 ([#566](#566)) ([828c6d6](828c6d6)), closes [/github.com//issues/552#issuecomment-4634261543](https://github.com//github.com/MatiPl01/react-native-sortables/issues/552/issues/issuecomment-4634261543) [#552](#552) ### Features * Add react-native-pulsar as a top-priority haptics adapter ([#568](#568)) ([642e734](642e734)) * Auto-detect expo-haptics when available ([#558](#558)) ([a0d7602](a0d7602)), closes [#554](#554) * Reverse items stacking order ([#535](#535)) ([14c7d82](14c7d82)), closes [#36877](https://github.com/MatiPl01/react-native-sortables/issues/36877) ### Performance Improvements * Drive active item position from a single reaction ([#586](#586)) ([c498091](c498091)), closes [#584](#584)
Owner
Author
|
馃帀 This PR is included in version 1.10.0 馃帀 The release is available on: Your semantic-release bot 馃摝馃殌 |
3 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Closes #545
On web, a
Sortable.Grid/Sortable.Flexinside a scrollable container couldn't be scrolled when the gesture started over an item (or aSortable.Touchable). Gesture Handler setstouch-action: noneon web, so the browser never scrolls from that element. The only workaround was a drag handle + a plainPressable.Fix
Web-only, isolated in
SortableGestureDetector.web(native is a plain passthrough; shared code is untouched):touch-actionto the scroll axis (pan-y/pan-x) so a swipe starting over an item scrolls the surrounding ScrollView.touchmovepreventDefault) so the relaxedtouch-actioncan't steal the drag.Net: swipe to scroll, hold to drag. No change on native.
Reproduction