Opened 7 years ago

Closed 6 years ago

#16329 closed defect (wontfix)

Tree: drop between has strange placement for TreeStoreModel w/multiple childrenAttrs

Reported by: bill Owned by: bill
Priority: low Milestone: 1.9
Component: Dijit Version: 1.8.1
Keywords: Cc:
Blocked By: Blocking:

Description

Using test_Tree_Dnd.html, and dragging any item and trying to drop it (for example) before or after the Vegetables category will put it under Foods, before any of the categories.

Change History (2)

comment:1 Changed 7 years ago by bill

Milestone: tbd1.9
Priority: undecidedlow

comment:2 Changed 6 years ago by bill

Resolution: wontfix
Status: newclosed
Summary: Tree: drop between has strange placementTree: drop between has strange placement for TreeStoreModel w/multiple childrenAttrs

The problem happens in TreeStoreModel.pasteItem() when it tries to get the children of the "Foods" parent node via:

var childItems = store.getValues(newParentItem, parentAttr).slice();

It's failing because of the line:

parentAttr = this.childrenAttrs[0];	// name of "children" attr in parent item

The problem is that childrenAttrs specifies multiple attributes (item and children), due to an ill-conceived feature added in #4528, and it's only checking items[], not children[].

This will all go away in 2.0, along with TreeStoreModel.js itself, so it's not worth fixing this bug.

Note: See TracTickets for help on using tickets.