Firefox doesn\'t properly trigger the dragleave event when dragging outside of the window:
https://bugzilla.mozilla.org/show_bug.cgi?id=665704
https://bugzil
only solution that has worked for me and took me a few goes hope this helps someone!
note when cloning you need to deepclone with events and data:
HTML:
Child element still works!
jQuery
$('.dropbox').each(function(idx, el){
$(this).data("counter" , 0);
});
$('.dropbox').clone(true,true).appendTo($('body');
$('dropbox').on({
dragenter : function(e){
$(this).data().counter++;
},
dragleave: function(e){
$(this).data().counter--;
if($(this).data().counter === 0)
}
});