In the trigger or action list, scroll attempts move items too easily#2149
Merged
Conversation
Previously the .draggable() modifier was applied to the entire ElevatedCard, causing any vertical swipe on an item to start a reorder instead of scrolling the parent LazyColumn. Moving the modifier to the DragHandle icon means: - touch anywhere on the card body → list scrolls normally - touch the drag handle and swipe → item reorders immediately - long-press anywhere on the list → item reorders (unchanged via dragContainer)
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.
Closes #2074
Summary
.draggable()modifier was attached to the entireElevatedCardin bothActionListItemandTriggerKeyListItem. BecausestartDragImmediately = falseonly adds a small pointer-slop threshold, any ordinary swipe gesture on the card body was intercepted as a reorder drag instead of being propagated to the parentLazyColumnas a scroll..draggable()from the card. Added it exclusively to theDragHandleicon withstartDragImmediately = true, so:dragContainer/detectDragGesturesAfterLongPressmechanism (unchanged).Known limitations / areas for human review
Boxwith a largerModifier.minimumInteractiveComponentSize()or explicit padding. This can be a follow-up.ActionListItemandTriggerKeyListItemwere changed. If other list items in the app use the same.draggable()-on-card pattern they may have the same issue and should be reviewed.Generated by Claude Code