Opened 12 years ago
Closed 12 years ago
#5240 closed defect (invalid)
Adding items to tree fails in weird ways
Reported by: | guest | Owned by: | |
---|---|---|---|
Priority: | high | Milestone: | |
Component: | Dijit | Version: | 1.0 |
Keywords: | Cc: | ||
Blocked By: | Blocking: |
Description
In _onNewItem() the 'parent' variable is declared locally inside a block and used outside of it, causing all sort of issues when changing contents of trees.
This is on version 1.0.1 (not present in the ticket version list)
After applying the fix below, the behavior is back as before
Change:
if(parentInfo){
var parent = this._itemNodeMap[this.getItemParentIdentity(item, parentInfo)];
To:
var parent = null;
if(parentInfo){
parent = this._itemNodeMap[this.getItemParentIdentity(item, parentInfo)];
Note: See
TracTickets for help on using
tickets.
Looking in svn, it seems that this code is here since a long time. I have no idea why it started breaking at the 1.0 (or 0.9+?) to 1.0.1 upgrade (no change made to my code).
This is with Firefox2, Mac OS X