Create a <div> with text inside it, attach drag drop listeners. Dynamically update the <div> text (using .innerHTML, for example) while dragging Text or URLs over the <div>. 1) Release the mouse button while dragging over the dynamic text; a drop event should be generated. 2) Press the escape key (to cancel the drag) while dragging over the dynamic text; a dragleave event should be generated. Safari 4 Beta (5528.16), FAILS 1) mouse button release: no drop event is generated. 2) escape key: no dragleave event is generated. Safari 3.1.2 (5525.2.0.1), FAILS 1) mouse button release: no drop event is generated. 2) escape key: no dragleave event is generated. IE7 (7.0.60001.18000) Vista SP1, OK 1) mouse button release: drop event generated. 2) escape key: dragleave event generated. IE6 (6.0.2900.5512.xpsp_sp3) XP SP3, OK 1) mouse button release: drop event generated. 2) escape key: dragleave event generated.
Created attachment 30187 [details] Drag Drop Test Case
Comment on attachment 30187 [details] Drag Drop Test Case Try dropping on events count numbers.
*** Bug 25691 has been marked as a duplicate of this bug. ***
Adding arv, who is working on another drag/drop fix that seems to fix this too.
It seems like this bug has been fixed?
Nope. Load test case in Tools/Scripts/run-safari --release and drop on the moving numbers, screenshot attached.
Created attachment 186295 [details] Drop on the moving numbers, no drop event results
(In reply to comment #7) > Created an attachment (id=186295) [details] > Drop on the moving numbers, no drop event results How do we know it's failing?
No drop event.
(In reply to comment #9) > No drop event. drag_drop_count says 7.
That was from tests where I dropped the data _not_ on from the moving text.
(In reply to comment #11) > That was from tests where I dropped the data _not_ on from the moving text. I'm not sure what the bug is then. Could you please create a better reduction where it can clearly show PASS or FAIL? All the description on this bug so far has been extremely vague.
Drop text in the blue box: a drop event is generated, except if you drop on the updating text, like the numbers shown for drag_event_count for example. Expected: a drop event should be generated no matter where you drop in the blue box.
Created attachment 186308 [details] Reduction Thanks for the clarification.
<rdar://problem/13142049>
(In reply to comment #14) > > Thanks for the clarification. Thanks for the reduction. Minor nit. <div ondragover="event.dataTransfer.dropEvent='copy';return false" ondrop="alert('PASS');" ondragenter="this.innerHTML+='|';"> ondragenter should also return false.
(In reply to comment #16) > (In reply to comment #14) > > > > Thanks for the clarification. > > Thanks for the reduction. Minor nit. > > <div ondragover="event.dataTransfer.dropEvent='copy';return false" > ondrop="alert('PASS');" ondragenter="this.innerHTML+='|';"> > > ondragenter should also return false. Not in WebKit.
(In reply to comment #17) > > ondragenter should also return false. > > Not in WebKit. Really? It's required by HTML5. The standard _does not_ say that a dragenter event must be followed by a dragover event, but it does say that their default actions must be cancelled to permit a subsequent drop event. So the event sequence dragenter -> {dragleave|drop} is permitted per spec, but the drop should be generated only if the default action of dragenter event was cancelled.
(In reply to comment #18) > (In reply to comment #17) > > > > ondragenter should also return false. > > > > Not in WebKit. > > Really? It's required by HTML5. The standard _does not_ say that a dragenter event must be followed by a dragover event, but it does say that their default actions must be cancelled to permit a subsequent drop event. > > So the event sequence dragenter -> {dragleave|drop} is permitted per spec, but the drop should be generated only if the default action of dragenter event was cancelled. I've spent a considerable amount of time trying to get the D&D event handling to follow the HTML spec (especially wrt cancelling the dragenter/dragover events), and it's rather tricky (often times, it only fails for one specific type of element). I'll try to take a look at this in the next few weeks, but I have quite a lot of other things on my plate atm.