dojo bug - ContentPane does not expand
dojo bug - ContentPane does not expand
HTML
<link rel="stylesheet" href="https://ajax.googleapis.com/ajax/libs/dojo/1.10.0/dijit/themes/claro/claro.css">
<div id="contentPanel">
<div id="titlePanel">
<div id="button">
</div>
<div id="content">
</div>
</div>
</div>
CSS
#titlePanel {
height: auto !important;
}
JavaScript
require(["dijit/layout/ContentPane", "dijit/TitlePane", "dijit/form/Button", "dojo/domReady!"], function(ContentPane, TitlePane, Button) {
this._contentPanel = new ContentPane({
style: "background-color:red;"
}, "contentPanel");
this._titlePanel = new TitlePane({
title: "I'm a TitlePane",
content: "Collapse me!"
}, "titlePanel");
this._button = new Button({
label: "Click me many times!",
onClick: function() {
this._titlePanel.addChild(new Button({
label: "Test",
style: "width: 250px"
}));
}.bind(this)
}, "button");
this._contentPanel.addChild(this._titlePanel);
this._titlePanel.addChild(this._button);
this._contentPanel.startup();
});