-
Bug
-
Resolution: Fixed
-
Normal
-
9.0.0, 9.0.1.2
-
Security Level: Jimmy
-
None
Steps to Reproduce
<zk> <button onClick="tabA.setSelected(true)" label="Select Tab A"/> <button onClick="tabB.setSelected(true)" label="Select Tab B"/> <button onClick="tabC.setSelected(true)" label="Select Tab C"/> <tabbox id="tabbox" mold="accordion" height="400px"> <tabs> <tab label="A" id="tabA"/> <tab label="B" id="tabB"/> <tab label="C" id="tabC"/> </tabs> <tabpanels> <tabpanel>A</tabpanel> <tabpanel>B</tabpanel> <tabpanel>C</tabpanel> </tabpanels> </tabbox> </zk>
- click button 'Select Tab B' or 'Select Tab C'
Current Result
'Tab A' remains selected
further attempts to select Tab B or C directly (not via button) are ignored (the tab seems frozen/disabled/closed)
Expected Result
possible to select an arbitrary tab directly and programmatically
Debug Information
side effect of ZK-4344
Workaround
disable the fix of ZK-4344 for accordion mold
zk.afterLoad('zul.tab', function() { var xTabbox = {}; zk.override(zul.tab.Tabbox.prototype, xTabbox, { setSelectedTab: function (tab) { var selTab = this._selTab; if (selTab != tab) { if(this._mold !== 'accordion') { this._selTab = null; // it will be set in Tab._selTab if (selTab) selTab.setSelected(false); } if (tab) tab.setSelected(true); } } });//zk.override });//zk.afterLoad