react-dnd / react-dnd

Drag and Drop for React

Home Page:http://react-dnd.github.io/react-dnd

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Not working in parent with modal styling { top: 50%, left: 50%, transform: translate(-50%, -50%) }

johnschatner opened this issue · comments

commented

Describe the bug
Not working in parent with modal styling { top: 50%, left: 50%, transform: translate(-50%, -50%) }. The SortableItem jumps away from the mouse cursor when starting the onDrag event.

Reproduction

CodeSandbox

Expected behavior
The drag handle should be positioned underneath the cursor and not jump somehwere. In the above example the element seems to jump down, in my instance it jumps to the right.

In the example you provided you are using dnd-kit. But this is react-dnd.

commented

This is embarrassing. Sorry!