[whatwg] contentEditable and drag and drop cancel

Charles Pritchard chuck at jumis.com
Tue Jan 31 22:16:42 PST 2012

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.


More information about the whatwg mailing list