steve.neill
16 Jul 2007, 10:01 AM
A few days ago I posted a thread reporting a potential bug (http://extjs.com/forum/showthread.php?t=9287). I'm convinced this is indeed a bug and I created a test-case to prove it.
Before the 'debugger' statement (best to run this in Firefox with Firebug installed), you'll see a tab with its toolbar. Then once a NestedLayoutPanel gets added to the layout region within the tab, the toolbar vanishes!
So why won't the UI respect the fact the layout region within the tab has a toolbar and compensate for it when the NestedLayoutPanel gets added?!
Any ideas anyone?
Thanks,
Steve
<html>
<head>
<link rel="stylesheet" type="text/css" href="ext-1.0.1a/resources/css/ext-all.css"/>
<script type="text/javascript" src="ext-1.0.1a/adapter/yui/yui-utilities.js"></script>
<script type="text/javascript" src="ext-1.0.1a/adapter/yui/ext-yui-adapter.js"></script>
<script type="text/javascript" src="ext-1.0.1a/ext-all-debug.js"></script>
<script language="javascript">
function test() {
var tabPanel = new Ext.TabPanel(window.document.getElementById("tab"));
var tab = tabPanel.addTab("id", "title");
var toolbar = new Ext.Toolbar(tabPanel.bodyEl);
toolbar.addButton({
cls: 'x-btn-text-icon'
, text: "button"
});
var layout = new Ext.BorderLayout(tabPanel.bodyEl, { center: { toolbar: toolbar } });
var wsDom = Ext.DomHelper.append(layout.getRegion('center').bodyEl, { tag: 'div' });
var wsLayout = { center: {} };
var wsBorderLayout = new Ext.BorderLayout(wsDom, wsLayout);
var wsLayoutPanel = new Ext.NestedLayoutPanel(wsBorderLayout);
// after this point you'll see the toolbar vanish...
debugger;
layout.getRegion('center').add(wsLayoutPanel);
}
</script>
</head>
<body onload="test()">
<div id="tab"></div>
</body>
</html>
Before the 'debugger' statement (best to run this in Firefox with Firebug installed), you'll see a tab with its toolbar. Then once a NestedLayoutPanel gets added to the layout region within the tab, the toolbar vanishes!
So why won't the UI respect the fact the layout region within the tab has a toolbar and compensate for it when the NestedLayoutPanel gets added?!
Any ideas anyone?
Thanks,
Steve
<html>
<head>
<link rel="stylesheet" type="text/css" href="ext-1.0.1a/resources/css/ext-all.css"/>
<script type="text/javascript" src="ext-1.0.1a/adapter/yui/yui-utilities.js"></script>
<script type="text/javascript" src="ext-1.0.1a/adapter/yui/ext-yui-adapter.js"></script>
<script type="text/javascript" src="ext-1.0.1a/ext-all-debug.js"></script>
<script language="javascript">
function test() {
var tabPanel = new Ext.TabPanel(window.document.getElementById("tab"));
var tab = tabPanel.addTab("id", "title");
var toolbar = new Ext.Toolbar(tabPanel.bodyEl);
toolbar.addButton({
cls: 'x-btn-text-icon'
, text: "button"
});
var layout = new Ext.BorderLayout(tabPanel.bodyEl, { center: { toolbar: toolbar } });
var wsDom = Ext.DomHelper.append(layout.getRegion('center').bodyEl, { tag: 'div' });
var wsLayout = { center: {} };
var wsBorderLayout = new Ext.BorderLayout(wsDom, wsLayout);
var wsLayoutPanel = new Ext.NestedLayoutPanel(wsBorderLayout);
// after this point you'll see the toolbar vanish...
debugger;
layout.getRegion('center').add(wsLayoutPanel);
}
</script>
</head>
<body onload="test()">
<div id="tab"></div>
</body>
</html>