Opened 11 years ago

Closed 11 years ago

#13741 closed defect (fixed)

AccordionContainer: addChild broken by textNodes and comments

Reported by: Karl Tiedt Owned by: bill
Priority: high Milestone: 1.7
Component: Dijit Version: 1.6.1
Keywords: StackContainer AccordionContainer TabContainer addChild textNode commentNode Cc:
Blocked By: Blocking:


If AccordionContainer? is the child of a widgetsInTemplate widget and the template is not laid out perfectly... (arguable term since perfect is the horrendous looking format that requires opening and closing tags on separate lines to prevent spurious textNodes)

when addChild does insertBefore() it uses childNodes[] which includes textNodes and commentNodes (which arent valid children) and then inserts the new child before them instead of the valid children.

Change History (3)

comment:1 Changed 11 years ago by bill

_Container.addChild() is supposed to handle this by calling getChildren() (which will ignore text nodes since they aren't widgets), and then used the returned children to execute a call like, refNode, "after").

So, please attach a test case, thanks.

comment:2 Changed 11 years ago by bill

Milestone: tbd1.7
Owner: set to bill
Status: newassigned

Nevermind, I made one. As Karl said on IM, after the AccordionContainer is started, it doesn't call _Container.addChild() but rather executes custom code.

comment:3 Changed 11 years ago by bill

Resolution: fixed
Status: assignedclosed

In [26354]:

Fixes to AccordionContainer.addChild() for numeric insert index after AccordionContainer is started, and when it contains stray text nodes. Fixes #13741 !strict.

Note: See TracTickets for help on using tickets.