[whatwg] More questions about the DnD API

Stef Epardaud stef at epardaud.fr
Tue Mar 30 00:38:04 PDT 2010


On Mon, Mar 29, 2010 at 02:04:22PM -0700, Daniel Cheng wrote:
>      I'm still trying to use the DnD for a real-world use, and keep hitting
>      problems. This is the HTML 5 draft at 7.9.4 Drag-and-drop processing
>      model:
>      "From this point until the end of the drag-and-drop operation, device
>      input events (e.g. mouse and keyboard events) must be suppressed."
> 
>    DragEvent (via MouseEvent) should expose ctrlKey, altKey, metaKey, and
>    shiftKey properties.

But then it's up to the developer to detect that the keys weren't
pressed before (implement keydown events themselves), which is less
practical.

>    dragstart and drag events are fired at the source node, but since you're
>    dragging from a non-DOM application, you won't get any. You should still be
>    getting dragenter / dragover / dragleave / drop if the item is
>    dragged/dropped over a DOM page though. It works for me in WebKit.

But if I want to be notified that an external application started a drag
in my document, where should I place the listener then? document? body
node?
-- 
Stéphane Epardaud



More information about the whatwg mailing list