I have a div which the user can drag, inside that div is a span with some text which I want to allow the user to select (thus they cannot drag it). How do I allow the div to
just posting in case someone searches for it with a similar Problem
element.addEventListener('mousedown', function() { this.parentNode.setAttribute("draggable", false); }); element.addEventListener('mouseup', function() { this.parentNode.setAttribute("draggable", true); });
worked for me