kutlugsahin / smooth-dnd

drag and drop library for javascript
MIT License
598 stars 146 forks source link

Wrong calculated coordinates of the drop container if draggable parent container has CSS transform. #62

Closed advntss closed 4 years ago

advntss commented 4 years ago

The bug can be reproduced on iview tab component, where tabs are are hiding using css transform. If draggable is positioned inside tab, then switching between tabs leads to wrong calculation of drop position when dragging - transform offset of the parent tab is being ignored.

kheera commented 4 years ago

I'm also having an incorrect coordinates issue. In my case [i thought it was] caused by new divs appearing and shifting the location of the draggable container. I added some placeholder divs as temporary fix. [edit: but that only helps a bit]

wrong-coordinates

kutlugsahin commented 4 years ago

@advantiss Good catch!