File Drag and Drop not working with new Firefox 3.5 Support
55 views
Skip to first unread message
adam
unread,
Jul 15, 2009, 3:35:16 PM7/15/09
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to Gears Users
I'm having trouble with Gears file drag and drop in Firefox 3.5. I'm
registering an event listener for the 'drop' event like so:
function handleFileDrop(evt) {
if (evt.preventDefault) {
evt.preventDefault();
}
var desktop = google.gears.factory.create("beta.desktop");
var data = desktop.getDragData(evt, 'application/x-gears-files');
var files = data && data.files;
if (files) {
// process files here
}
The event is fired and captured properly but the call to
desktop.getDragData() returns "The drag-and-drop event is invalid."
I've tested this on CentOS 5.3 and Windows XP with the same results.
Any ideas what might be going wrong?
Note: this code works with gears on Firefox 3.0.x when listening for
the 'dragdrop' event. Also the script tag including gears_init.js is
in the body tag not the head.
Brendan
unread,
Jul 17, 2009, 8:13:02 AM7/17/09
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message