Fix touch reordering on mobile browsers#419
Open
ophirSarusi wants to merge 1 commit into
Open
Conversation
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.
Summary
Fix touch-based reordering on mobile browsers by disabling native touch scrolling on existing drag activators.
Problem
On mobile browsers, sortable elements can activate and appear to float, but moving the finger scrolls the page instead of reordering the element.
This affects:
Pages CMS uses dnd-kit's
PointerSensor. Pointer-based dragging requires the drag activator to opt out of native browser panning; otherwise, the browser may interpret the gesture as page scrolling.Change
Apply
touch-action: noneto the existing.cursor-movedrag activators:All current sortable activators already use this class, so the fix covers list handles, image thumbnails, and file thumbnails without duplicating styles across components.
The rule is limited to drag activators. Users can still scroll normally by swiping elsewhere on the page.
Manual validation
Tested using a dedicated reproduction harness with the same React, dnd-kit, and sensor configurations used by Pages CMS.
Test device:
2016128151145.0.2-20251124145406145.0.2Verified:
touch-action: noneScope