[whatwg] contentEditable and drag and drop cancel

Ryosuke Niwa rniwa at webkit.org
Tue Jan 31 22:55:25 PST 2012

On Tue, Jan 31, 2012 at 10:51 PM, Ryosuke Niwa <rniwa at webkit.org> wrote:

> On Tue, Jan 31, 2012 at 10:16 PM, Charles Pritchard <chuck at jumis.com>wrote:
>> **
>> Yes, that's correct -- I'm testing on Chrome.
>> I'd like to drag and drop a file from the desktop into a position in the
>> contentEditable with one action.
>> But, it seems that I have to cancel the default action of drag (to get
>> the file)
> Why do you have to do that? And when?

I think I understand what you're saying now. For your use case, you should
use dropzone content attribute:

Then all you have to write is a drop event handler where you have access to
clipboard data.

- Ryosuke

More information about the whatwg mailing list