-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Open
Description
π Production Link
codepen
π Related Issue
#139 β Same issue occurring when using transform: scale()
instead of zoom
.
π§© Description
We have a drag-and-drop container that users can zoom (e.g., zoom out to get a better overview). The zoom is applied by setting the CSS zoom
property on the parent container of the drag-and-drop area.
However, once zoom is applied, the drag-and-drop behavior becomes misaligned:
- When you start dragging an item, it immediately shifts away from the cursor.
- The item's position is offset and no longer tracks the mouse correctly.
- It appears the drag-and-drop logic does not account for the zoom level applied to the container.
- the drop behavior is fine and follows the cursor
βοΈ Technical Details
- Zooming is done via
zoom: 0.8
on the container. - The issue is similar to [bug / feature req] Drag offset error when inside transform: scale()Β #139, which involves the same problem when using
transform: scale()
.
β Expected Behavior
Dragging should behave normally and accurately follow the pointer, even when the container is zoomed using CSS zoom
.
Metadata
Metadata
Assignees
Labels
No labels