Open jonahgoldsaito opened 11 years ago
Hmm... I thought that namespacing the event might allow both to coexist, but apparently not.
I have them both working, but I had to add a couple lines of code to prevent filedrop from throwing an error on non-file drops.
function drop(e) {
if( opts.drop.call(this, e) === false ) return false;
if( typeof(e.dataTransfer) !== 'object' ) return false;
if(e.dataTransfer === null) return false;
files = e.dataTransfer.files;
Any DOM element that has been run through filedrop() can no longer be used as a jquery UI draggable/sortable component.
I found that by commenting out //.on('dragstart', opts.dragStart); near the top of the file, jquery's draggable/sortable functionality is back in business.
I'm building a web app whose UI has sortable list items that need to be able to accept an image from the desktop.
Commenting that out means that a user defined dragstart method would not be called, but at least in my implementation, I'm not utilizing it. I imagine for others, leaving this out would be a problem.
Could the event be renamed "dragstart.filedrop" and still function.