Draggable button in Firefox Draggable button in Firefox javascript javascript

Draggable button in Firefox


There is already a bug on Firefox where you can't drag a button. https://bugzilla.mozilla.org/show_bug.cgi?id=568313

However you can drag your div containing button (which is not draggable right now) using 'after' pseudo class.Example:

document.getElementById("myDivWithButton").addEventListener(  "dragstart",  function (e) {    e.dataTransfer.setData("Text", "myDivWithButton")  });
.frontdrop {   position: relative;}.frontdrop:after {    content: '';    top: 0;    left: 0;    right: 0;    bottom: 0;    position: absolute;}
<div id="myDivWithButton" class="frontdrop" draggable="true"><button>Div with Button</button></div>