Setting dataTransfer.dropEffect does not affect IE9

Setting dataTransfer.dropEffect in dragEnter and dragOver handlers does not work in Internet Explorer 9 . Regardless of the value, the cursor is apparently determined only by the value of dataTransfer.effectAllowed set during dragStart.

In the example below, you will get the “copy” cursor (plus arrow) by selecting and dragging “DRAG ME” both by “MOVE” and “COPY” in IE9.

http://jsfiddle.net/aHDWL/

function fnDragOnDefault()
{
  var oEvent = window.event;
  oEvent.returnValue = false;

  var oData = window.event.dataTransfer;
  oData.dropEffect = "move";
}

If you return to IE8 document mode (you can use F12 for this), then the dropEffect parameter will work , and the cursor will differ in two windows.

Is there a fix / workaround?

Thank!

+5

All Articles