WebKit Bugzilla
New
Browse
Search+
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
NEW
27670
Unable to set drag image for a link using setDragImage
https://bugs.webkit.org/show_bug.cgi?id=27670
Summary
Unable to set drag image for a link using setDragImage
Jessie Berlin
Reported
2009-07-24 17:05:29 PDT
Created
attachment 33477
[details]
Test case for setting the dragImage for a link. At the start of a drag operation you can use event.dataTransfer.setDragImage(...) to change the graphic to display by the cursor during the operation. On Windows Safari it is not supported on <a> tags, which uses the default drag image for the link instead of whatever image is specified in by setDragImage. (Breaking up
https://bugs.webkit.org/show_bug.cgi?id=24735
)
Attachments
Test case for setting the dragImage for a link.
(1.25 KB, text/html)
2009-07-24 17:05 PDT
,
Jessie Berlin
no flags
Details
Screenshot from Google Chrome 14.0.835.187
(88.02 KB, image/png)
2011-09-30 23:42 PDT
,
Rafał Miłecki
no flags
Details
View All
Add attachment
proposed patch, testcase, etc.
Rafał Miłecki
Comment 1
2011-09-30 23:42:53 PDT
Created
attachment 109399
[details]
Screenshot from Google Chrome 14.0.835.187 It works fine here.
Rafał Miłecki
Comment 2
2011-09-30 23:49:21 PDT
Jessie: first of all your test case is invalid: 1) It doesn't have DOCTYPE (like HTML5's <!DOCTYPE html>) 2) You don't pass "event" in "ondragstart" 3) In "dragLinkAndSeeDivDragged" you use undefined event Webkit recovers from last two issues by silently magically setting "event" inside the function. Thanks to that this test case *works* in my Google Chrome 14.0.835.187. If you fix the issues I have mentioned, the test case starts working also in Firefox. Please, re-test this bug, it seems to be fixes now.
Alexey Proskuryakov
Comment 3
2011-10-01 22:28:41 PDT
The behavior has improved since this bug was filed, the fix was in <
http://trac.webkit.org/changeset/86472
>. But the drag image is still misplaced in WebKit nigtlies.
> Webkit recovers from last two issues by silently magically setting "event" inside the function.
It's not so magical, see <
http://www.quirksmode.org/js/events_access.html
> for a description of window.event. Besides, it's completely unrelated to this bug, so let's not discuss that here.
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