Stopping propagation
See original GitHub issueWith nested dropzones, we need to make it possible for child dropzone to “take over”, so that parent becomes inactive when item is dragged over child.
While it’s possible to do e.stopPropagation()
inside over
/ leave
/ enter
/ acceptDrop
, it interferes with how react-dnd works around brower hacks because events never reach window
in this case.
I’m not sure how to handle this yet.
Issue Analytics
- State:
- Created 9 years ago
- Comments:8 (5 by maintainers)
Top Results From Across the Web
Event.stopPropagation() - Web APIs | MDN
The stopPropagation() method of the Event interface prevents further propagation of the current event in the capturing and bubbling phases.
Read more >stopPropagation() Event Method - W3Schools
The stopPropagation() method prevents propagation of the same event from being called. Propagation means bubbling up to parent elements or capturing down to ......
Read more >How to Stop Propagation of an Event in JS - JavaScript Tutorial
To stop an event from further propagation in the capturing and bubbling phases, you call the Event.stopPropation() method in the event handler. Event....
Read more >What's the difference between event.stopPropagation and ...
event.stopPropagation() – It prevents the event from propagating (or “bubbling up”) the DOM. Stops callback execution and returns immediately when called.
Read more >Stopping Propagation with Event.stopPropagation() - YouTube
You can use the Event.stopPropagation() method in JavaScript to stop further propagation of events in the bubbling or capturing phases.
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
I have this exact problem right now. Are there any temporary work around solutions?
Edit: Actually, I have the reverse problem. I have nested Draggable Sources, and I want to be able to move the children around, and then drag the parent separately.
Edit 2: Figured it out by adding
e.stopPropagation()
to thecanDrag()
function on the child.Edit 3: Now I’ve run into this problem for real.
Superseded by #87.