On Tue, Mar 30, 2010 at 2:54 AM, Stef Epardaud <span dir="ltr"><<a href="mailto:stef@epardaud.fr">stef@epardaud.fr</a>></span> wrote:<br><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
<div class="im">On Tue, Mar 30, 2010 at 02:33:07AM -0700, Daniel Cheng wrote:<br>
</div><div class="im">>      But what was the rationale for preventing key events while doing DnD?<br>
><br>
>    I'm not 100% sure, but I'm assume it's so that the process of dragging and<br>
>    dropping doesn't trigger unrelated mouse / keyboard listeners.<br>
<br>
</div>Unrelated yes, but that also prevents applications from adding DnD<br>
functionality based on key presses.<br>
<div class="im"><br>
>      Why not make the implied drag and/or dragstart explicitely fired when<br>
>      external applications start DnD in the browser? That might make it<br>
>      simpler and more consistent.<br>
><br>
>    Because those events are intended for a source node. It introduces several<br>
>    new problems (which node should get the event? how do authors differentiate<br>
>    between the two different types of dragstart?) without really solving<br>
>    anything that isn't already handled by other events. If you have drop<br>
>    targets in your page, you don't really care about a drag and drop operation<br>
>    in progress unless the item is dragged over your page--at which point one<br>
>    can simply use dragenter / dragover / dragleave.<br>
<br>
</div>How about registering the drag/dragstart on window.external?<br>
<br>
So you're saying that if I start dragging from a document element (say a<br>
div) and from an external application over the document, in both cases a<br>
dragenter listener registered on the body element should get fired even<br>
when the drag is currently over a descendent of the body?<br>
Same for dragleave when the drag is finished or the drag went out of the<br>
browser window (to other external apps for example)?<br>
<br>
If so, then I can live with this.<br></blockquote><div><br></div><div>Yep, as long as event propagation is not stopped.</div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">

<font color="#888888">--<br>
Stéphane Epardaud<br>
</font></blockquote></div><br>