-
Bug
-
Resolution: Unresolved
-
Normal
-
None
-
8.5.2.1
-
None
reproduce
- define tabbox with 2 available tabs
- 2nd tab can be disabled or hidden via databinding, e.g. disabled="@load(vm.disabled[tab])"
- select 2nd tab (still available at that moment)
- send command, which disables 2nd tab via databinding
- tab gets disabled but tabbox is still visible
same with "visible" state. This is a bug, because disabled/invisible tabs should not be selectable!
A client-side workaround could look as following - but server-side handling would be probably better:
{{zk.afterLoad('zul.tab', function () {
new zul.tab.Tab(); // force init
var orgFunc = zul.tab.Tab.prototype.setDisabled;
zul.tab.Tab.prototype.setDisabled = function() {
orgFunc.apply(this, arguments);
if (this.isDisabled() && this.isSelected())
}
});}}