Opened 6 years ago

Closed 6 years ago

#16584 closed defect (invalid)

Dnd an item from a nested source to the parent source does not work

Reported by: Magnus Stålberg Owned by: Eugene Lazutkin
Priority: undecided Milestone: tbd
Component: DnD Version: 1.8.3
Keywords: Cc:
Blocked By: Blocking:

Description

I'm trying to drag items between nested dojo/dnd/Sources. It is possible to drag an item from the parent source to the child source, but not the other way if you don't drag the item outside the parent node.

Below is a simple example that demonstrates the problem. I have also created a JSFiddle: http://jsfiddle.net/FQVZY/ HTML

    <div id="source1">
        <div class="dojoDndItem">In parent 1</div>
        <div class="dojoDndItem">In parent 2</div>
        <div class="dojoDndItem">In parent 3</div>
        <div class="dojoDndItem">In parent 4</div>
        <div id="subSource" style="padding-left: 10px;">
            <div class="dojoDndItem">In sub 1</div>
            <div class="dojoDndItem">In sub 2</div>
            <div class="dojoDndItem">In sub 3</div>
        </div>
    </div>

JS

require(["dojo/dnd/Source"], function(Source){
  var s1 = new Source("source1", {});
  var s2 = new Source("subSource", {});
});

It seems like the onMouseOver in dojo/dnd/Container never triggers the onOverEvent when moving from the inner container to the parent.

Change History (1)

comment:1 Changed 6 years ago by Eugene Lazutkin

Resolution: invalid
Status: newclosed

Nested DnD sources are explicitly unsupported. If you want to build and support hierarchical structures consider Dijit's Tree, which supports DnD.

Note: See TracTickets for help on using tickets.