Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
haripriya9209 opened this issue Apr 17, 2023 · 1 comment

Comments

@haripriya9209
Copy link

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

@petestarkey
Copy link

Solution suggested here works for me: #362 (comment)

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants