Quantcast
Channel: Active questions tagged html - Stack Overflow
Viewing all articles
Browse latest Browse all 67441

Opting out of `dragenter` and `dragover` events (html5)

$
0
0

I have a collection of draggable "content" elements, and a root-level "feedback" UI element which is displayed above them to provide feedback during drag and drop.

The problem is, during the drag operation, hovering over the "feedback" element causes the dragenter and dragover events to be fired on that element, rather than the underlying content element. It effectively "blocks" the dragenter event from firing on the correct element.

Is there a way for an element to cancel, or "opt out" of a dragenter/dragover event? I could display the feedback element underneath the content, but I'd rather not do that.

jsFiddle:http://jsfiddle.net/jact8/1/

I'm using the HTML drag/drop API, not jQuery or anything like that.


Viewing all articles
Browse latest Browse all 67441

Trending Articles