fix: prevent drag icon scale from persisting during reordering #79
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.
closed #78
Description
This PR fixes a bug where the drag icon remained scaled (
0.85) after dragging items downward within theReorder.Group.The issue occurred because
whileTapdepends on thepointerupevent being fired on the same element.When the drag started via
dragControls.start(e), the pointer was captured by the parentReorder.Item,causing
whileTapto never receive the release event — resulting in the icon staying enlarged indefinitely.Changes
whileTapfrom the drag icon (ReorderIcon) to prevent incorrect scale persistenceisDraggingstate insideItemto track drag lifecycle (onDragStart,onDragEnd)ReorderIconto animate scale using theisDraggingflag for reliable state syncMotivation
Previously,
whileTaprelied on receiving apointerupevent on the same element.However, when dragging started, the pointer was captured by the parent through
dragControls.start(e).This prevented the icon from receiving the release signal, causing the scale to persist indefinitely.
By switching to a drag lifecycle–based approach (
onDragStart/onDragEnd),the icon’s animation now resets reliably regardless of drag direction or pointer capture.
Breaking Changes
None — this update only affects internal drag icon behavior and visual feedback.
2025-10-20.12.55.45.mov