question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

How to move Draggable to a div and it can only be dropped within that?

See original GitHub issue

Can i move a draggable to a div block and it can only be dropped within that? If i release the mouse outside the div, draggable will return to it original position. Can someone have a solution?

Issue Analytics

  • State:open
  • Created 4 years ago
  • Reactions:4
  • Comments:7

github_iconTop GitHub Comments

1reaction
tianzhichcommented, Nov 14, 2019

same problem +1.

@KashanSiddiqui seems draggable can be bounds to its offsetParent, but it defines nothing about drop zone. So I have switched to react-dnd.

1reaction
june6969commented, Oct 18, 2019

bounds=“parent-div”

Read more comments on GitHub >

github_iconTop Results From Across the Web

How to move Draggable to a div and it can only be dropped ...
Can i move a draggable to a div block and it can only be dropped within that? If i release the mouse outside...
Read more >
Draggable Div only draggable one time - Stack Overflow
Always check the debugger when you run your code. This line $('.draggable').draggable().data()["ui-draggable"].cancelHelperRemoval = true;.
Read more >
Using the HTML5 Drag and Drop API - web.dev
To make an object draggable set draggable=true on that element. Just about anything can be drag-enabled: images, files, links, files, or any ...
Read more >
Drag and Drop in Pure TypeScript and React
Basically, we just need to follow the four steps below to enable drag and drop. The first two steps enable the dragging, and...
Read more >
Drag operations - Web APIs - MDN Web Docs - Mozilla
The draggable attribute is set to "true" , so this element becomes draggable. If this attribute were omitted or set to "false" ,...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found