vue-draggable-resizable icon indicating copy to clipboard operation
vue-draggable-resizable copied to clipboard

BUG: locks elements to the left/top when mouse is over another element

Open dkjain opened this issue 3 years ago • 2 comments

I think this is a bug, when the vdr component is being dragged and happens to go underneath another element and if you click at that moment (when vdr is underneath another element), vdr snaps to top-left, appears to lock itself, ie. trying to get it to be drag-gable again doesn't work. It seems to loose context.

This also happens when the vdr component in a parent container (with parent="false") gets some of it hidden underneath the parents boundary and the mouse pointer is now over in the parent's parent territory, like this:

vdr-issue-snap-to-top-left-canvas

Thanks

dkjain avatar Feb 27 '22 18:02 dkjain

I'm hitting something similar with parent="true", would take a bit to build out on example, but in some cases it happens but a refresh fixes it, however in my app I have the idea of "paging" and going to the next page to reveal different components seems to make it bug consistently. Not sure if it's because some recalculations need to be done after page switch (paging does change parent container the components are in).

Modicrumb avatar Mar 24 '22 15:03 Modicrumb

I figured out what it was for me, I was giving the draggables an initial position of 0,0 which messed them up. They naturally should be positioned at the top of the parent with no influence by giving them position:absolute then it works fine.

Modicrumb avatar Mar 24 '22 16:03 Modicrumb