lundi 9 mars 2015

dragleave triggered when child object is visible


Vote count:

0




The following is supposed to be used for file upload. http://ift.tt/1MoDHes


When a dragover is fired and the mouse is not on top of the #drop it works just as expected. But when it enter the #drop it triggers the leave event then the enter and loops. As if the child element is not a part of the body and is treated as a body dragleave.


//The #drop should take the entire screen (100%) but for this demo I left some space around for you to see it works when mouse is not over child.



$('body').bind({

dragover: function() {
$('#drop').addClass('over');
},

dragleave: function() {
$('#drop').removeClass('over');
}
});


asked 1 min ago

miro

1,586






dragleave triggered when child object is visible

Aucun commentaire:

Enregistrer un commentaire