selected tabpanel remains visible once corresponding tab gets disabled or hidden

XMLWordPrintable

    • Type: Bug
    • Resolution: Unresolved
    • Priority: Normal
    • None
    • Affects Version/s: 8.5.2.1
    • Component/s: Components
    • None
    • 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())

      { this.getTabbox().setSelectedIndex(0); }

      }
      });}}

            Assignee:
            Unassigned
            Reporter:
            fse
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated: