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.

Stopping propagation

See original GitHub issue

With 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:closed
  • Created 9 years ago
  • Comments:8 (5 by maintainers)

github_iconTop GitHub Comments

3reactions
felixakiragreencommented, Nov 20, 2014

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 the canDrag() function on the child.

Edit 3: Now I’ve run into this problem for real.

0reactions
gaearoncommented, Feb 18, 2015

Superseded by #87.

Read more comments on GitHub >

github_iconTop 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 >

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