Tabbar hide-show problem

I see this problem only in the newer version 4.0 prof of the dhtmlxsuite;

I create a simple tabbar

            objTabBar=objWindow.attachTabbar({ tabs: [] });

afterwards there is some logic activating or disactivating tabs
so there is


both tabs are correctly visible


first tab disappears: correct!


*** first tab is not visible after reactivating! ***

command has changed from previous version, but documentation states, we should call “show”;
why doesn’t it work as expected?


works fine locally. please provide browser details?

I’m seeing what seems to be the same issue, but when I try to put together a demo showing the problem, the problem doesn’t occur. Still trying to work out what’s different between our application and my demo.

Leonardo, were you able to resolve this?

no, wasn’t able to solve; I’ll put a (not working) example on the page these next days

Ok… hopefully you have more success with getting your demo to not work than I am.

I’ve debugged a bit into my application, and it looks like the tabs aren’t getting displayed because there’s a flag that’s gotten stuck on true - conf.transActv. From what I can tell, this is supposed to indicate if the tab is in the process of being hidden/shown, so that the component doesn’t trip over itself trying to do more than one thing to a tab at a time. Unfortunately at some point, this flag never gets set back to false, and so the tabbar component mistakenly thinks it needs to ignore the show() call because a hide() call is still in progress. I’m still not sure why this happens in my application but not in my demo, however.

Ok, I still don’t know what’s causing this, but I’ve found a solution nonetheless.

Running this snippet below after your dhtmlx.js import - but BEFORE you create any tabbar components - should disable the transitions that I believe are causing the problem. Your tabbar won’t look as swishy and cool as it’s supposed to, but at least it’ll work the way you expect it to.

window.dhx4.transDetect = function(){ 
	this.transData = { 
			transProp: false, 
			transEv : null
	return this.transData;

wonderful, thanks! I’ll try it!

your solution works very well; but maybe it’s time to solve it in a more generic way, correcting the js; knowing dhx-guys are reading these notes, I’ll try to explain the problem in a more detailed way; I just downloaded the actual version - 2/3 version after the problem was told - and the problem is still there;
here’s a brief explaination

*) container

*) creating empty tabbar
objTabBar = new dhtmlXTabBar
parent: “desktop”,
arrows_mode: “auto”,
[ ]

*) function which hides all existing tabs, and then shows the ones to activate;
if a tab’s not present, it creates it the first time

  function ShowButtons(goTabs)
    for (i=0; i<actualTabs.length; i++) 
    for (i=0;i<thisArray.length;i++)
      if (idx<0)
  • and now the problematic thing:
    • if I call this function the first time, it works well
    • if I call this function (with other parameters) a second time, it may work or it may not work
    • if I call this function a third time, I’m pretty sure it won’t work anymore

    when I say “it doesn’t work” I don’t mean there’s a js-error or something special: it simply
    doesn’t show each tab it should

so calling this function

the tabbar should show only the tabs which are parameters of the last call of the function;
but it won’t! most of the time it doesn’t show the first or the first two tabs at all
(at this moment - the third call - both of them are already existing and should just be

is there a more elegant solution than the one stated?


please try attached
83.ZIP (382 KB)

it works perfectly! I suppose this is not the last version of the js, as it seems a little smaller than the one we have; should we just wait the next official release in which this correction will be present? thank you very much in the meantime!

this is patched 4.1.3 std

also you can:

  1. use it
  2. wait for official update
  3. open ticket, I will add changes directly to your used version

ok, thank you …
we use professional version, so we will wait for the next official update;
thank you very much!