Looks like we can't reproduce the issue or there's a problem in the test case provided.
-
Sencha User
tabConfig in Ext.tab.Panel defaults breaks tabpanel's functionality
tabConfig in Ext.tab.Panel defaults breaks tabpanel's functionality. This bug is highly related to http://www.sencha.com/forum/showthread.php?244600, but that one is closed, and discussion there went to irrelevant directions (like how to use shared xtypes etc.)
Ext version tested:
Ext 4.2.1
Browser versions tested against:
Chromuim Version 30.0.1599.114 Ubuntu 12.04 (30.0.1599.114-0ubuntu0.12.04.3)
FF 25.0.1 (firebug 1.12.5 installed)
DOCTYPE tested against:
html
Description:
Using tabConfig in tab panel's defaults property makes tabs titled with the same text, and tabs except the first can't be clicked.
Ext.tab.Panel's defaults is for sharing attributes among tabs. Sharing tabConfig: { flex: 1 } among tabs should be done by using Ext.tab.Panel's defaults: { tabConfig: { flex: 1 } }. This produces the bug.
This patch fixes the bug:
Ext.define('Ext.tab.Panel', {
...
onAdd: function(item, index) {
...
-cfg = item.tabConfig || {},
+cfg = item.tabConfig ? Ext.clone(item.tabConfig) || {},
Steps to reproduce the problem:
http://jsfiddle.net/wQGY2/
The result that was expected:
I have 2 tabs: "AAA" and "BBB"
The result that occurs instead:
I have two "AAA" tabs.
-
Sencha User
Fiddle updated: https://fiddle.sencha.com/#fiddle/227
Actually Object.create is enough instead of Ext.clone. Tabs just need a new reference inherited from the common tabConfig.
-
Thanks for the report! I have opened a bug in our bug tracker.