Opened 15 years ago

Closed 15 years ago

#2490 closed defect (fixed)

Image tag as a drag copy source doesn't work in Mircosoft IE 7

Reported by: [email protected] Owned by: psowden
Priority: high Milestone:
Component: DnD Version: 0.4.1
Keywords: Cc:
Blocked By: Blocking:


After I dragged and dropped a <image> as drag copy source, I can't drag and drop this source to another drop target in IE 7.0 web browser. But it work`s fine with Firefox 1.5 and 2.0 . If I have integrated a letter between the <span> and <image>, then I can drag at on the letter, but still not at the picture.

Code example:


new dojo.dnd.HtmlDragCopySource?(dojo.byId("modul"), "mod", true);


<span id="modul"><img src="abc.jpg" alt="A modul"/></span>

dojo version 0.4.1

IE version 7.0


Change History (2)

comment:1 Changed 15 years ago by [email protected]

The following (moderately tested) patch seems to cure the problem:

--- dojo-0.4.1-ajax/src/dnd/HtmlDragAndDrop.js  Wed Dec  6 10:39:40 2006
+++ dojo/src/dnd/HtmlDragAndDrop.js     Thu Mar  8 15:42:06 2007
@@ -492,6 +492,9 @@

                insert: function(e, refNode, position){
                        var node = e.dragObject.domNode;
+                       if ( {
+                               node.ondrag = function () { return false; };
+                       }

                        if(position == "before"){
                                return dojo.html.insertBefore(node, refNode);

Alternatively, setting .ondrag = function () { return false; }; on the target node should work too.

comment:2 Changed 15 years ago by Eugene Lazutkin

Resolution: fixed
Status: newclosed

Fixed in 0.9.

Note: See TracTickets for help on using tickets.