Opened 13 years ago

Closed 12 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:


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 and wrap the accordionShell div with a ContentPane?, e.g.:

<h2>Programatically created:</h2>
<div dojoType="dijit.layout.ContentPane">
	<div id="accordionShell"></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 13 years ago by bill

Component: GeneralDijit
Owner: anonymous deleted

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.

comment:2 Changed 13 years ago by jchase

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 12 years ago by bill

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

Maybe my current work on ContentPane resize propagation will fix this.

comment:4 Changed 12 years ago by bill

Resolution: fixed
Status: assignedclosed

Calling resize() on the wrapping ContentPane (as happens automatically when you open the pane) should work now, after [20091].

Note: See TracTickets for help on using tickets.