Bug 17112 - "Move" effect shows up like "disabled" when dragging
Summary: "Move" effect shows up like "disabled" when dragging
Alias: None
Product: WebKit
Classification: Unclassified
Component: New Bugs (show other bugs)
Version: 523.x (Safari 3)
Hardware: PC Windows Vista
: P2 Normal
Assignee: Nobody
Depends on:
Reported: 2008-01-31 01:47 PST by fengjin
Modified: 2009-10-15 20:54 PDT (History)
2 users (show)

See Also:


Note You need to log in before you can comment on or make changes to this bug.
Description fengjin 2008-01-31 01:47:07 PST
Trying to drag a "<a>" element on a div element. In the div element's on dropping event, set the droEffect as "move". The actual effect is "disabled". However, setting to "copy" can succeed.

----- Here is the test html -----

<script language="javascript">

window.onload = function()
	var oDrag = document.getElementById("divDrag");	
	oDrag.addEventListener("dragstart", onDragDivStart, false);
	var oDrop = document.getElementById("divDrop");
	oDrop.addEventListener("drop", onDropDiv, false);
	oDrop.addEventListener("dragover", onDragOverDiv, false);
	oDrop.addEventListener("dragenter", onDragOverDiv, false);

function onDragDivStart(e)
	e.dataTransfer.setData("Text", "Mystery!!");
	e.dataTransfer.effectAllowed = "all";
	shwTxt("on drag div start!");

function onDropDiv(e)
	e = e || event;
	var s = e.dataTransfer.getData("Text");
	shwTxt("onDrop : " + s);

function onDragOverDiv(e)
	e = e || window.event;
	var s = e.dataTransfer.getData("Text");
	e.dataTransfer.dropEffect = "move"; // "Copy" and "link" works
	shwTxt("ondragover : " + s);
	e.returnValue = false;

function shwTxt(s)
	document.getElementById("divOutput").innerHTML += "<br>" + s;	


<div id="divDrop">drop on me</div>
<a href="www.google.com" id="divDrag">Drag me</a>

<div id="divOutput" style="top:200px"></div>
Comment 1 Sebastian Markbåge 2009-03-20 18:07:21 PDT
I can confirm that this is the case on Windows. It seems to be Windows specific though because the Mac versions does allow move operations.
Comment 2 Daniel Bates 2009-10-15 20:54:28 PDT
This issue has been resolved as of r49651 as part of the fix for bug #24731.