Widget dijit/layout/ContentPane
does not resize properly when adding widgets as children.
Steps to reproduce issue:
- Open test case at https://jsfiddle.net/9eja3jtr/
- Click 10 times button "Click me many times!".
Issue:
dijit/layout/ContentPane
does not resize when adding widgets as children. Content inserted is not fully visible.
I would need the dimensions for dijit/layout/ContentPane
to be increased in order to accommodate new added widgets so that all inner widgets should be visible.
I think this is a bug within the dijit widget.I would like to know a workaround if any.
Notes: I have reported bug to dojo https://bugs.dojotoolkit.org/ticket/19021
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();
});