jQuery-File-Upload icon indicating copy to clipboard operation
jQuery-File-Upload copied to clipboard

Drag&Drop from Thunar (XFCE file manager) to Firefox results in empty FileList

Open Guigoz opened this issue 13 years ago • 8 comments
trafficstars

Hi,

The drag & drop does not seems to works with FF, but it still works on Chrome. I can reproduce the problem on your demo page : http://blueimp.github.com/jQuery-File-Upload/

I use FF version 16.0.2

Thanks for your plugin! Guillaume

Guigoz avatar Nov 08 '12 14:11 Guigoz

Sorry, but I couldn't reproduce any problems with Drag&Drop on Firefox 16.0.2, tested on both OSX 10.8 and Windows XP.

Can you provide a more detailed error report? Error console output? Operating system version? Kind of files you tried to drag&drop?

blueimp avatar Nov 08 '12 14:11 blueimp

Hi,

Sorry, I've not provided enough details!

I'm using linux (debian 6.0.6 ), I havn't tried on windows when I wrote this issue but it works on windows.

There are no errors in the console.

I tried with a simple .txt file. It works on Chrome with this file but not on FF.

Guigoz avatar Nov 08 '12 14:11 Guigoz

Which filemanager did you use on Debian? Gnome's Nautilus? KDE's Konqueror?

blueimp avatar Nov 08 '12 15:11 blueimp

My window manager is XFCE and my filemanager is Thunar. I'm just draging the file from my desktop to FF.

Guigoz avatar Nov 08 '12 15:11 Guigoz

OK, this seems to be a bug in Firefox, since the following (pure) JavaScript code results in an empty FileList reported in the console when dropping files dragged from Thunar:

document.addEventListener('dragover', function (e) {
    e.preventDefault();
}, false);
document.addEventListener('drop', function (e) {
    e.preventDefault();
    console.log(e.dataTransfer.files.length);
}, false);​

You can try it out on JSFiddle: http://jsfiddle.net/wpT4q/1/

There is also a related entry in the Firefox bug tracker: https://bugzilla.mozilla.org/show_bug.cgi?id=609284

blueimp avatar Nov 08 '12 17:11 blueimp

Thank you for your (very fast) answer! And sorry for the waste of time, I didn't thought it could come from my system.

I'll watch the bug tracker entry.

Closing this issue!

Greetings, Guillaume.

Guigoz avatar Nov 09 '12 08:11 Guigoz

No worries. I marked the issue entry as browser bug, so I think we can keep it open for other users stumbling on this issue. If the Firefox bug gets closed, we can close it too.

blueimp avatar Nov 09 '12 08:11 blueimp

FireFox 17.0: dataTransfer.files == null Opera 12.11: dataTransfer.files.length == 0

But test (http://jsfiddle.net/wpT4q/1/) prints 1 to console in both browsers.

OS is Windows 7.

tnodir avatar Nov 30 '12 09:11 tnodir