Opened 12 years ago
Closed 11 years ago
#9211 closed defect (fixed)
Programmatically created AccordionContainer does not render properly when created within a ContentPane
Reported by: | jchase | Owned by: | bill |
---|---|---|---|
Priority: | high | Milestone: | 1.4 |
Component: | Dijit | Version: | 1.3.0 |
Keywords: | AccordionContainer ContentPane Programmatic | Cc: | |
Blocked By: | Blocking: |
Description
When an AccordionContainer? is created programmatically within a ContentPane?, the AccordionContainer? does not render properly.
The simplest way to demonstrate this is to take the test located at http://download.dojotoolkit.org/release-1.3.0/dojo-release-1.3.0/dijit/tests/layout/AccordionContainer.html and wrap the accordionShell div with a ContentPane?, e.g.:
<h2>Programatically created:</h2> <div dojoType="dijit.layout.ContentPane"> <div id="accordionShell"></div> </div>
The AccordionContaner?'s child ContentPanes? don't expand out properly. Setting a height on the wrapping ContentPane? seems to do nothing either. It also seems to only affect AccordionContainers? created programmatically - declarative AccordionContainers? seem unaffected.
A side by side comparison in Firebug reveals that the AccordionContainer?'s child ContentPanes? are having their height set to 0 after being opened.
Change History (4)
comment:1 Changed 12 years ago by
Component: | General → Dijit |
---|---|
Owner: | anonymous deleted |
comment:2 Changed 12 years ago by
Yes! Thanks. Calling resize() on the AccordionContainer? works perfectly.
Calling resize() on the wrapping ContentPane? seems to do nothing, however. Tried both immediately and after a 1000 ms delay.
comment:3 Changed 11 years ago by
Milestone: | tbd → 1.4 |
---|---|
Owner: | set to bill |
Status: | new → assigned |
Maybe my current work on ContentPane resize propagation will fix this.
comment:4 Changed 11 years ago by
Resolution: | → fixed |
---|---|
Status: | assigned → closed |
Calling resize() on the wrapping ContentPane (as happens automatically when you open the pane) should work now, after [20091].
Yes, you aren't allowed to modify the contents of the ContentPane without telling ContentPane that you changed something.. (In this case, you are first creating the ContentPane when it contains plain DOM nodes, and then "secretly" converting those DOM nodes into an AccordionContainer widget.
I think it will work if you call resize() on the ContentPane after you finish changing the contents. Or you could call resize() on the AccordionContainer itself.