Opened 8 years ago

Closed 3 years ago

#13726 closed defect (patchwelcome)

Tree: items dropped in order they were selected, rather than order before drag

Reported by: siqi Owned by:
Priority: low Milestone: 1.13
Component: Dijit Version: 1.6.1
Keywords: dijit.Tree, DnD Cc: liucougar, zhongsq@…
Blocked By: Blocking:

Description

The issue could be reproduced through following steps:

  1. Open dijit/tests/tree/test_Tree_DnD.html, hold on ctrl key and select node 'Vegetables' and 'Fruits' (Select Vegetables first and then Fruits).
  1. Move the selected nodes to Cereals.

Result: Vegetables is appended to Cereals as the first child, Fruits is appended to Cereals as the second child.

Expected result: Vegetables is appended to Cereals as the second child, Fruits is appended to Cereals as the first child.

More details could be found in the attachment image.

Attachments (3)

Step1.png (11.7 KB) - added by siqi 8 years ago.
result.png (6.8 KB) - added by siqi 8 years ago.
billStep1.gif (12.3 KB) - added by bill 8 years ago.
in my avatar vegetables is above fruits

Download all attachments as: .zip

Change History (7)

Changed 8 years ago by siqi

Attachment: Step1.png added

Changed 8 years ago by siqi

Attachment: result.png added

Changed 8 years ago by bill

Attachment: billStep1.gif added

in my avatar vegetables is above fruits

comment:1 Changed 8 years ago by bill

Cc: liucougar added
Priority: highnormal
severity: majornormal
Summary: Incorrect item order after DnD operation in dijit.TreeTree: items dropped in order they were selected, rather than order before drag

OK, so it looks like the items are inserted in the order they were selected, rather than the order of the items in the original tree. I'm actually not sure what the "correct" behavior is. I tried Windows Explorer but it doesn't allow multi-selection.

Note that the nodes being dragged may not be siblings. For example, in test_Tree.html, a user can select Africa and Australia, which are at different levels of the tree. Since Australia appears after Africa (in a DFS of the tree), I suppose if that if test_Tree.html allowed DnD you would want Australia to become the last child in the drop target, regardless of which order Africa and Australia were picked in?

I also tried Thunderbird but it just always keeps children sorted alphabetically. So for example, in test_Tree.html if the user selected China and Australia, it would insert Australia first and China second, even though China comes before Australia in the tree.

Last edited 7 years ago by bill (previous) (diff)

comment:2 Changed 7 years ago by bill

Milestone: tbdfuture

comment:3 Changed 6 years ago by bill

Priority: highlow

comment:4 Changed 3 years ago by dylan

Milestone: future1.12
Resolution: patchwelcome
Status: newclosed

Given that no one has shown interest in creating a patch in the past 4+ years, I'm closing this as patchwelcome.

Note: See TracTickets for help on using tickets.