react-draggable icon indicating copy to clipboard operation
react-draggable copied to clipboard

Unable to drag the image as similar to the div component inside draggable element

Open haripriya9209 opened this issue 2 years ago • 1 comments

If an image is added inside the draggable element, then on drag the component doesn't drag, instead, it is selected and when we move the mouse, then the image gets movable, whereas, in the div component, the text is wrapped with draggable element, the drag and drop works as expected. I have tried adding fixed width and height as well, even though it is not working. Require some immediate help on this. Attaching code sandbox example: https://codesandbox.io/s/react-draggable-example-image-forked-vv50zr?file=/src/components/App.js

haripriya9209 avatar Apr 17 '23 07:04 haripriya9209

Solution suggested here works for me: https://github.com/react-grid-layout/react-draggable/issues/362#issuecomment-600186093

Essentially, add draggable={false} to your image element.

petestarkey avatar May 18 '23 16:05 petestarkey

Thankss, your comment saved the day.

mohitsud avatar Apr 24 '25 02:04 mohitsud