mmalinowski42 / dynatree

Automatically exported from code.google.com/p/dynatree
0 stars 0 forks source link

IE8 drag&drop: use of "over", "before", "after #446

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. use IE8 (the code works fine with both Firefox and Chrome
2. click this link: http://www.wothke.ch/tinyrsid/index.php/explorer
3. try to drag files from the left expandable tree to the node "Favorites" on 
the right. (my logic aims to restrict drag&drop to the management of a flat 
list under that node)

Info: The logic builds on the standard "drag&drop 3" example. The problem seems 
to be due to the use of "over", "before", "after" in my onDragEnter and 
onDragOver handlers (see below). Apparently IE8 does not handle these..

            onDragEnter: function(node, sourceNode) {
                // make sure new entries cannot be dropped on existing playlist entries
                 if(sourceNode) {
                    var playListRoot= $("#tree2").dynatree("getTree").selectKey("playlistId");
                    if (node == playListRoot) {
                        return "over"; 
                    }
                    return ["before", "after"];;        // disallow dropping on existing playlist entries
                 } else {
                    return false;   // ignore non-dynatree droppables
                 }               
            },
            onDragOver: function(node, sourceNode, hitMode) {
                 if(sourceNode) {
                    var playListRoot= $("#tree2").dynatree("getTree").selectKey("playlistId");      
                    if (node.data.key == playListRoot.data.key) {
                        if ((hitMode == "before") || (hitMode == "after")) {                        
                            return false;   // disallow dropping outside "playlist"
                        } else {
                            return true;    // allow dropping on main "playlist" node
                        }
                    }
                    if(hitMode == "over"){
                        return false;   // disallow dropping on existing playlist enties
                    }
                    return true;    // allow dropping between existing playlist entries
                } else {
                    return false;   // ignore non-dynatree droppables
                 }
            },

Original issue reported on code.google.com by juergen....@gmail.com on 25 Jul 2013 at 5:30

Attachments:

GoogleCodeExporter commented 9 years ago

Original comment by moo...@wwwendt.de on 28 Jul 2013 at 1:48

GoogleCodeExporter commented 9 years ago
This issue was closed by revision r671.

Original comment by moo...@wwwendt.de on 28 Jul 2013 at 2:03