Opened 12 years ago

Closed 12 years ago

#11413 closed defect (worksforme)

(Fixed Code Provided) AccordionContainer fails when removing selectedChildWidget

Reported by: grimmy102 Owned by:
Priority: high Milestone: tbd
Component: Dijit Version: 1.4.2
Keywords: Cc:
Blocked By: Blocking:

Description (last modified by bill)

I needed to empty my AccordionContainer? to reload w/ new data. When I remove the child which was selected, it failed in StackContainer?.js in removeChild(), in this block of code (line 144, I believe):

			// in case the tab titles now take up one line instead of two lines
			// TODO: this is overkill in most cases since ScrollingTabController never changes size (for >= 1 tab)

layout() eventually results in a check to see if there's a selectedChildWidget, and if so, it resizes it. Because this call to layout() happens before selectedChildWidget is set to undefined, but after the selectedChildWidget's been partially deleted, the attempt to resize the half-deleted selectedChildWidget fails.

My proposed solution is to move the block of code pasted above to be below this block of code:

if(this.selectedChildWidget === page){
			this.selectedChildWidget = undefined;
				var children = this.getChildren();

I'm planning to go live w/ my dojo-based site soon, so I have set this to "blocker."

Change History (2)

comment:1 Changed 12 years ago by bill

Component: GeneralDijit
Description: modified (diff)
Owner: anonymous deleted
Priority: highnormal

I can't reproduce this. You'll need to attach a test case using the attach file button.

In test_AccordionContainer.html tried this in firebug against both 1.4 and 1.5, and it worked w/out error:


In 1.5, I also tried removing all the other children and that worked too:


comment:2 Changed 12 years ago by bill

Resolution: worksforme
Status: newclosed
Note: See TracTickets for help on using tickets.