Tabbar multiple closing tabs not shifting left when closed

I have a requirement to load multiple tabs. The scenario is:

  1. User can load multiple tabs
  2. If the user has say three tabs 1,2,3 and closes tab2, tab3 does not left shift and leaves a gap.

Sample attached…
sample.zip (599 KB)

Line 47 in your demo:
Replace “100px” with 100

tabbar.setLabel(id, id, 100);

Hi Darya,

Tried that but that makes things worse. Now the tabs are being placed in random positions on the tabbar

Locally it works.
What browser and OS you have?

OK, I think its because I had duplicate code in line 67. Have removed and now works!!

Thank you for your help!

You are welcome!