W3C home > Mailing lists > Public > whatwg@whatwg.org > October 2009

[whatwg] Issue on drag & drop example in specification?

From: Ian Hickson <ian@hixie.ch>
Date: Tue, 27 Oct 2009 07:22:10 +0000 (UTC)
Message-ID: <Pine.LNX.4.62.0910270644520.9145@hixie.dreamhostps.com>
On Mon, 26 Oct 2009, Shumpei Shiraishi wrote:
> I'm sorry for delay of replying and thanks for your post very much.
> > Here you want to put the preventDefault() after the for() loop, so 
> > that it cancels the event only if the type was not found.
> Mmm, it seems my mistake about understanding the specification...

Actually no, my mistake, sorry!

Your example should work, with the call in question put in (not commented 
out). If it doesn't, then that's a bug in the relevant browsers. I just 
tried it in a recent WebKit nightly build and it seems to work with the 
line included.

> And what I wanted to say is, "dnd operation is performed in spite of
> omitting to call preventDefault() in dragenter event, so could I omit
> to handle the dragenter event?".

If you omit the preventDefault() call, the drag shouldn't be allowed on 
the element on which the event wasn't canceled.

Ian Hickson               U+1047E                )\._.,--....,'``.    fL
http://ln.hixie.ch/       U+263A                /,   _.. \   _\  ;`._ ,.
Things that are impossible just take longer.   `._.-(,_..'--(,_..'`-.;.'
Received on Tuesday, 27 October 2009 00:22:10 UTC

This archive was generated by hypermail 2.4.0 : Wednesday, 22 January 2020 16:59:18 UTC