react-dnd / react-dnd-html5-backend

HTML5 backend for React DnD [Legacy Repo]

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Preview position wrong with absolute positioned elements inside DragSource

danielbrodin opened this issue · comments

Hey,

I have an element that I'm dragging around and it works great by itself, but that element could have an icon attached to it with position: absolute; left: -24px; which breaks the positioning.

This html5-backend doesn't care about the icon which it shouldn't, but the native drag and drop api does, since it includes the icon in the preview rendering, so when the html5-backend tries to fix the position it instead breaks it for me.

Is there a way for me to kinda hijack the positioning function and just add a couple of pixels to the x coordinate that it creates?