Bug 9960 - Event.dataTransfer.setDragImage doesn't work for child elements
Summary: Event.dataTransfer.setDragImage doesn't work for child elements
Status: NEW
Alias: None
Product: WebKit
Classification: Unclassified
Component: DOM (show other bugs)
Version: 420+
Hardware: Mac OS X 10.4
: P2 Normal
Assignee: Nobody
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2006-07-16 14:02 PDT by Jeff Watkins
Modified: 2022-07-06 14:34 PDT (History)
3 users (show)

See Also:


Attachments
Test case showing empty element during drag. (1.13 KB, text/html)
2006-07-16 14:04 PDT, Jeff Watkins
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Jeff Watkins 2006-07-16 14:02:14 PDT
In an ondragstart handler, calling setDragImage with a child element results in an empty element being dragged around.
Comment 1 Jeff Watkins 2006-07-16 14:04:37 PDT
Created attachment 9503 [details]
Test case showing empty element during drag.

This is a sample HTML file that demonstrates the problem. Of course, it's always possible I'm insane and not calling things correctly.

To reproduce: click on the empty area beside either Line 1 or Line 2 and hold, then drag. You should see an empty yellow div as you're dragging around.
Comment 2 Jeff Watkins 2006-07-16 14:10:21 PDT
(In reply to comment #1)
> To reproduce: click on the empty area beside either Line 1 or Line 2 and hold,
> then drag. You should see an empty yellow div as you're dragging around.

Um... that should be a _red_ div.
Comment 3 Alexey Proskuryakov 2006-07-17 04:43:24 PDT
For another example that looks similar, see bug 5054.
Comment 4 Brent Fulgham 2022-07-06 14:34:14 PDT
I can't see an empty yellow (or red) div as I drag on any of Safari, Chrome, or Firefox. Not sure if this is still an issue, or if the test is out of date.