Opened 11 years ago
Closed 11 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 )
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):
if(this._started){ // 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) this.layout(); }
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; if(this._started){ var children = this.getChildren(); if(children.length){ this.selectChild(children[0]); } } }
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 11 years ago by
Component: | General → Dijit |
---|---|
Description: | modified (diff) |
Owner: | anonymous deleted |
Priority: | high → normal |
comment:2 Changed 11 years ago by
Resolution: | → worksforme |
---|---|
Status: | new → closed |
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: