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

Open
#716 2 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
3/5
Estimated time
1-2 days
Newbie friendliness
38/100
Issue type
Bug
Clarity
Mostly clear
Activity status
Stale
Tech stack
javascript, react
Domain
frontend

Research direction

Reproduce the issue in the linked CodeSandbox, starting with src/components/App.js and the image-inside-draggable example. Compare the image and div behavior, then verify that dragging the image moves the draggable element instead of selecting or moving the image independently.

Written by the indexing model from the issue text.

Description

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

Dominant language
JavaScript
Stars
9.3k
Forks
1k
Avg merge
3d 8h
Merged PRs (30d)
4

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from react-grid-layout/react-draggable

All issues in react-grid-layout/react-draggable

Similar issues

More JavaScript issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.