[PP-1] Drag overlay is misplaced when dragging quickly

Created on 27 March 2025, about 2 months ago

Overview

Postponed until 📌 Investigate drag-and-drop solution that removes the need to drop items into the preview iFrame Active lands.

In order to be able to click the components in the overlay, an activationConstraint (in App.tsx) was added so that a component must be dragged 3px before dragging starts. However this conflicts with the DndKit snapCenterToCursor modifier - when you drag and move the mouse quickly the snapCenterToCursor is based on where mousedown happened, not where the mouse is when dragStart happens.

Proposed resolution

Tricky. Either remove the activationConstraint and find another way to make components clickable/selectable or write a custom modifier to replace snapCenterToCursor that somehow tracks the current mouse position, not the clientX and clientY from the event passed to it.

Some other people have reported the same issue in Dndkit https://github.com/clauderic/dnd-kit/issues/1288

User interface changes

🐛 Bug report
Status

Active

Version

0.0

Component

Page builder

Created by

🇬🇧United Kingdom jessebaker

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Production build 0.71.5 2024