Several issues with Tabbar

Hi,
I’ve found some issues with Tabbar:

  • if Tabbar is created without any tab and new tab is created later using method addTab(), the method getActive() returns null
  • div element attached using attachHTML() is not available for document.getElementById()
    • immediately after attachment
    • if Tab is not active
  • any content inserted /using innerHTML or append()/ into div element attached using attachHTML() later is removed when tab is deactivated

Maybe there is any way I haven’t found but these are blocking issues for usage of Tabbar in AJAX based dynamic applications for me.
Thanks a lot for any help
Martin R.

if Tabbar is created without any tab and new tab is created later using method addTab() , the method getActive() returns null

The problem is confirmed. We’ll fix it in the future updates.

div element attached using attachHTML() is not available for document.getElementById()

  • immediately after attachment

Unfortunately, this is the expected behavior as the browser needs some time to render your html-elements on the page so it will be available using the DOM api, while there is no possibility to control it from our side.

  • if Tab is not active

Due to the virtual DOM only the currently viewing elements are render. As soon as the element hides it will be removed from the DOM to increase the performance of the page.

any content inserted /using innerHTML or append() / into div element attached using attachHTML() later is removed when tab is deactivated

It is also related to the Virtual DOM features.

if Tabbar is created without any tab and new tab is created later using method addTab() , the method getActive() returns null

The problem was fixed in the dhtmlxSuite 6.4.3.
You can test it here:
https://snippet.dhtmlx.com/fkou9gpc