W3C home > Mailing lists > Public > whatwg@whatwg.org > January 2012

[whatwg] contentEditable and drag and drop cancel

From: Charles Pritchard <chuck@jumis.com>
Date: Tue, 31 Jan 2012 22:16:42 -0800
Message-ID: <4F28D8CA.4070607@jumis.com>
On 1/31/12 9:10 PM, Ryosuke Niwa wrote:
> On Wed, Jan 18, 2012 at 4:11 PM, Charles Pritchard <chuck at jumis.com 
> <mailto:chuck at jumis.com>> wrote:
>
>     What was the verdict, or what is the current position on using
>     drag and drop dataTransfer with contentEditable?
>
>     As I understand things:
>     One must run ondragover = function() { return false; } to capture
>     a drag and drop data.
>     By returning false, the default behavior of a contentEditable box,
>     which is to move the cursor, is canceled.
>
>
> Could you elaborate on what you mean by "to move the cursor" is 
> canceled? Are you saying that the caret won't move to where the mouse 
> pointer is? On which browser did you test this behavior?

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); which means the caret doesn't move.


-Charles
Received on Tuesday, 31 January 2012 22:16:42 UTC

This archive was generated by hypermail 2.3.1 : Monday, 13 April 2015 23:09:10 UTC