<div class="gmail_quote">On Sun, Mar 28, 2010 at 1:29 PM, Stef Epardaud <span dir="ltr"><<a href="mailto:stef@epardaud.fr">stef@epardaud.fr</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
Hello,<br>
<br>
I didn't get any reaction to my previous email unfortunately since I<br>
think I brought up some valid points, but in any case I have some more<br>
feedback, so I keep sending :)<br>
<br>
I'm still trying to use the DnD for a real-world use, and keep hitting<br>
problems. This is the HTML 5 draft at 7.9.4 Drag-and-drop processing<br>
model:<br>
<br>
"From this point until the end of the drag-and-drop operation, device<br>
input events (e.g. mouse and keyboard events) must be suppressed."<br>
<br>
This looks crazy to me. First Mozilla doesn't limit this since I was<br>
able to get a keypress event while dragging a node. I use this to change<br>
the behaviour of the drag operation with control/meta/alt keys while<br>
dragging, the same way file managers do it (at least Gnome Nautilus) and<br>
lots of other applications (Open Office for example). We need to be able<br>
to access key events while dragging. There might be a good rationale for<br>
this limitation stated in the spec, but based on evidence of how DnD is<br>
used in other applications perhaps it should be reviewed?<br></blockquote><div><br></div><div>DragEvent (via MouseEvent) should expose ctrlKey, altKey, metaKey, and shiftKey properties.</div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
<br>
Personally I also use the key events while dragging to allow the user to<br>
open folders in order to continue the drag operations inside, instead of<br>
requiring them to drop the file in the folder, then open the folder and<br>
drag it again to a subfolder.<br>
<br>
I also have a question regarding DnD started in an external application:<br>
since we get no dragstarted or drag events, how can we detect that<br>
something wants to be dragged in the window? I want to highlight every<br>
responsive drop points so the user can know which elements are valid<br>
drop targets, but failed to get any meaningful interaction with<br>
dragentered or dragover on the document, or body elements. Surely that's<br>
a mistake from my part, but since I expect that it's going to be asked a<br>
lot (when we don't get drag or dragstart events), perhaps it should be<br>
mentioned in the spec?<br></blockquote><div><br></div><div>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.</div>
<div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
<br>
Thanks for your help.<br>
<font color="#888888">--<br>
Stéphane Epardaud<br>
</font></blockquote></div><br><div>Of course, I have a question of my own. In <a href="http://www.whatwg.org/specs/web-apps/current-work/multipage/dnd.html#effectAllowed-initialization">http://www.whatwg.org/specs/web-apps/current-work/multipage/dnd.html#effectAllowed-initialization</a>, is it intentional that any drag event can change the value of effectAllowed for the next event? Does it make sense to making this property settable only during dragstart / drag?</div>
<div><br></div><div>Daniel</div>