clauderic / clauderic/dnd-kit

`event.operation.transform` never gets updated when feedback is "none"

Open
#2,055 2 comments 0 reactions 0 assignees View on GitHub
bug dom triage:done
Dominant language
TypeScript
Stars
17.6k
Forks
924
Avg merge
2d 10h
Merged PRs (30d)
2

Description

**Issue**:

When feedback is disabled via `Feedback.configure({ feedback: 'none' })`, `operation.transform` in the `onDragStart` / `onDragMove` / `onDragEnd` events always remains at its initial value `{ x: 0, y: 0 }`.

**Background**:

I'm using dnd-kit to implement card resize handles. In this scenario, I don't need any feedback element or overlay at all — the handle will be positioned according to the card's size rather than the mouse position.

In this case, I rely on the `transform` value from the events to compute the latest card's size.

**Root cause**:

`dragOperation.snapshot().transform` only reads from the cache without triggering a recomputation, and the `transform` is only computed inside the Feedback plugin (and only when a feedback element exists).

As a result, when `feedback === 'none'`, `dragOperation.snapshot().transform` will always return only the initial value.

This looks like a bug — having system event values depend heavily on the internal behavior of a plugin feels like a leaky abstraction.

Contributor guide

Open the contributing guide

Research direction

Start by tracing dragOperation.snapshot().transform through the Feedback plugin and the onDragStart, onDragMove, and onDragEnd event paths. Reproduce a drag with Feedback.configure({ feedback: 'none' }) and verify that operation.transform changes as the drag moves. Done means the event transform reflects the current operation even without a feedback element, with relevant tests covering this configuration.

Written by the indexing model from the issue text.

Assessment

Tech stack
react, typescript
Domain
frontend
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
52/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.