Skip to content

fix(dom): apply the final pointer move before a drop - #2204

Open
rayw-lab wants to merge 1 commit into
clauderic:mainfrom
rayw-lab:codex/apply-final-pointer-move
Open

rayw-lab wants to merge 1 commit into
clauderic:mainfrom
rayw-lab:codex/apply-final-pointer-move

Conversation

@rayw-lab

Copy link
Copy Markdown

Fixes #2201.

If the pointer moves and releases before the next animation frame, dragend can report the previous position and drop target. Apply the pending move and let its coordinates settle before ending the drag.

The new regression test holds the frame callback until after the drop and checks that the move fires once. In Chrome, the same sequence moved the drop from the first target to the second and reported the final transform.

Tests

  • Built the helpers and DOM packages with bun run build --filter=@dnd-kit/helpers... and bun run build --filter=@dnd-kit/dom...
  • Ran bun test in packages/dom and passed all 89 tests
  • Reproduced the same-frame drop in Chrome with two drop targets

@changeset-bot

changeset-bot Bot commented Nov 26, 2026

Copy link
Copy Markdown

⚠️ No Changeset found

Latest commit: 3759ed2

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

This branch has not been deployed

No deployments
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.

PointerSensor ends a drag without applying the last pointer move, so the drop lags the release by one frame

1 participant