Skip to content


Subversion checkout URL

You can clone with
Download ZIP
tree: 1b41cc5725
Fetching contributors…

Cannot retrieve contributors at this time

56 lines (45 sloc) 1.954 kb
<title>Test for WebKit bug 24735: Poor setDragImage support on Windows</title>
<style type="text/css">
.draggable {
-webkit-user-drag: element;
-webkit-user-select: none;
#linkToUseAsImage {
background-color: silver;
#divToUseAsImage {
background-color: pink;
<script type="text/javascript">
function dragDivAndSeeImageDragged()
event.dataTransfer.setDragImage(document.getElementById("imgToUseAsImage"), event.pageX, event.pageY);
function dragImageAndSeeDivDragged()
event.dataTransfer.setDragImage(document.getElementById("divToUseAsImage"), event.pageX, event.pageY);
<body >
<h3>Test for <a href=''>WebKit bug 24735</a>: Poor setDragImage support on Windows</h3>
<p>Instructions: </p>
<p>When you drag the first div, the image under the cursor should be of the second image. </p>
<p>When you drag the first image, the image under the cursor should be of the second div. </p>
<br />
<br />
<div class="draggable" ondragstart="dragDivAndSeeImageDragged()"> Drag me, I am a div! (first div)</div>
<br />
<br />
<img src="resources/webkit-background.png" class="draggable" ondragstart="dragImageAndSeeDivDragged()" />
<br />
<br />
<img src="resources/drag-image.png" id="imgToUseAsImage" />
<br />
<br />
<div id="divToUseAsImage"> When a drag is started on the image, this is the div that is used as the drag image! (second div)</div>
Jump to Line
Something went wrong with that request. Please try again.