moxiecode/plupload — pull request #439 by tiff (2011-12-15 16:55:20+00:00)
Title: Make HTML5 Drag&drop more versatile

When using plupload to provide drag and drop abilities, especially to something containing a textbox (for example, a share box), plupload would take over all drag actions on the area and only allow files to be dropped. We used a helper function to only take over file-related drags, allowing text and other things to be manipulated by the application code without interference, or left to the browser (i.e. for rearranging text in a textbox).

This code was tested in Firefox 3.6 and later, recent Chrome, and Safari 4 and later, all on OS X. We did not test with Internet Exploder because it doesn't seem to use the HTML5 runtime.

Also, a question: we couldn't seem to find a clean way to provide our hasFiles helper function to external code. If we wanted to provide drag feedback in our application for only file drags, we'd have to copy/paste the function into our codebase. What is a clean way to provide this function to the application?