on-internet
← Community

How to remove pointer-events from all children of the element with a dragover event?

Stack Overflow ·

I created a global dragover event listener so that when something it dragged over the page it would show a dragover area on the page and hide it when you move the cursor off the page: document.addEventListener('dragover', event => { event.preventDefault() this.dragOverArea = true // ... }) document.addEventListener('dragleave', event => { event.preventDefault() this.dragOverArea = false // ... }) Problem JSfiddle: http://jsfiddle.net/ct3haqf0 Try dragging any file over the elements on the page (from the top left) you will see the dragover event switching to dragleave rapidly back and forth whi

Comments

Sign in or sign up to comment and upvote.

No comments yet.