WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
NEW
Bug 25690
Drop event is never fired when dragover's target element is removed even if the event was canceled by its ancestor
https://bugs.webkit.org/show_bug.cgi?id=25690
Summary
Drop event is never fired when dragover's target element is removed even if t...
noel gordon
Reported
2009-05-11 06:41:40 PDT
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.
Attachments
Drag Drop Test Case
(2.67 KB, text/html)
2009-05-11 06:47 PDT
,
noel gordon
no flags
Details
Drop on the moving numbers, no drop event results
(2.38 MB, image/jpeg)
2013-02-03 21:07 PST
,
noel gordon
no flags
Details
Reduction
(803 bytes, text/html)
2013-02-03 22:27 PST
,
Ryosuke Niwa
no flags
Details
Show Obsolete
(2)
View All
Add attachment
proposed patch, testcase, etc.
noel gordon
Comment 1
2009-05-11 06:47:59 PDT
Created
attachment 30187
[details]
Drag Drop Test Case
noel gordon
Comment 2
2009-05-11 06:50:33 PDT
Comment on
attachment 30187
[details]
Drag Drop Test Case Try dropping on events count numbers.
Mark Rowe (bdash)
Comment 3
2009-05-11 19:06:07 PDT
***
Bug 25691
has been marked as a duplicate of this bug. ***
Julie Parent
Comment 4
2009-07-01 10:22:20 PDT
Adding arv, who is working on another drag/drop fix that seems to fix this too.
Ryosuke Niwa
Comment 5
2013-02-03 13:55:09 PST
It seems like this bug has been fixed?
noel gordon
Comment 6
2013-02-03 21:05:23 PST
Nope. Load test case in Tools/Scripts/run-safari --release and drop on the moving numbers, screenshot attached.
noel gordon
Comment 7
2013-02-03 21:07:07 PST
Created
attachment 186295
[details]
Drop on the moving numbers, no drop event results
Ryosuke Niwa
Comment 8
2013-02-03 21:45:41 PST
(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?
noel gordon
Comment 9
2013-02-03 21:47:45 PST
No drop event.
Ryosuke Niwa
Comment 10
2013-02-03 21:51:01 PST
(In reply to
comment #9
)
> No drop event.
drag_drop_count says 7.
noel gordon
Comment 11
2013-02-03 21:56:27 PST
That was from tests where I dropped the data _not_ on from the moving text.
Ryosuke Niwa
Comment 12
2013-02-03 21:58:47 PST
(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.
noel gordon
Comment 13
2013-02-03 22:06:00 PST
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.
Ryosuke Niwa
Comment 14
2013-02-03 22:27:52 PST
Created
attachment 186308
[details]
Reduction Thanks for the clarification.
Radar WebKit Bug Importer
Comment 15
2013-02-03 22:31:23 PST
<
rdar://problem/13142049
>
noel gordon
Comment 16
2013-02-03 22:58:32 PST
(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.
Ryosuke Niwa
Comment 17
2013-02-03 23:36:54 PST
(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.
noel gordon
Comment 18
2013-02-04 03:59:40 PST
(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.
Daniel Cheng
Comment 19
2013-02-04 11:09:34 PST
(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.
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug