Skip to content

Conversation

@Yeom-JinHo
Copy link
Contributor

closed #78

Description

This PR fixes a bug where the drag icon remained scaled (0.85) after dragging items downward within the Reorder.Group.
The issue occurred because whileTap depends on the pointerup event being fired on the same element.
When the drag started via dragControls.start(e), the pointer was captured by the parent Reorder.Item,
causing whileTap to never receive the release event — resulting in the icon staying enlarged indefinitely.


Changes

  • Removed whileTap from the drag icon (ReorderIcon) to prevent incorrect scale persistence
  • Introduced isDragging state inside Item to track drag lifecycle (onDragStart, onDragEnd)
  • Updated ReorderIcon to animate scale using the isDragging flag for reliable state sync
  • Added a spring transition for smoother recovery after drag release

Motivation

Previously, whileTap relied on receiving a pointerup event 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

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.

Drag item icon size doesn't revert after dragging down.

2 participants