Skip to content

Commit

Permalink
fix Safari drag&drop functionality when cancelling the event in docum…
Browse files Browse the repository at this point in the history
…ent.body (or any parent element of the droppable area)
  • Loading branch information
gonchuki committed Jan 11, 2012
1 parent cea775a commit b88da45
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/javascript/plupload.html5.js
Original file line number Diff line number Diff line change
Expand Up @@ -395,6 +395,11 @@
dropInputElm.parentNode.removeChild(dropInputElm);
}, uploader.id);

// avoid event propagation as Safari cancels the whole capability of dropping files if you are doing a preventDefault of this event on the document body
plupload.addEvent(dropInputElm, 'dragover', function(e) {
e.stopPropagation();
}, uploader.id);

dropElm.appendChild(dropInputElm);
}

Expand Down

0 comments on commit b88da45

Please sign in to comment.