My answer to this question is to use event capturing instead of event bubbling.
In a nutshell, event capturing "trickles down" from the outer element, to the source element or until e.stopPropagation()
is called.
Event bubbling bubbles events up from the source element up through parents until it reaches the document or is stopped with e.stopPropagation()
.
So, to apply to drag enter, you want the outer div to handle the event, even though it is actually the inner div that is generating the event.
Using event capturing make the ondragenter fire in the Outer Div before the inner div. In the outter div event handler, you call e.stopPropagation. So the inner div event handler never actually runs.
This is how to use jquery to capture the event:
$("#outerDiv").get(0).addEventListener("ondragenter", function(e){e.stopPropagation()}, true);
Note the last parameter.