Summary: | Drop event is never fired when dragover's target element is removed even if the event was canceled by its ancestor | ||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Product: | WebKit | Reporter: | noel gordon <noel.gordon> | ||||||||
Component: | UI Events | Assignee: | Nobody <webkit-unassigned> | ||||||||
Status: | NEW --- | ||||||||||
Severity: | Normal | CC: | arv, dcheng, dglazkov, rniwa, sam, tony, webkit-bug-importer | ||||||||
Priority: | P2 | Keywords: | InRadar | ||||||||
Version: | 525.x (Safari 3.1) | ||||||||||
Hardware: | Mac | ||||||||||
OS: | OS X 10.5 | ||||||||||
Attachments: |
|
Description
noel gordon
2009-05-11 06:41:40 PDT
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.
(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. |