Categories | Question details Back To List | ||||||||
Bug on delete a tab When i remove a tab with the method "removeTab(tab,mode)", the id of tab removed is not deleted in the collection "tabbar.tabsId" How i can resolve this bug? Answer posted by Support on May 02, 2008 04:27 Problem confirmed and fixed, please use attached js file instead of original one ( if you are using pro version - please contact us directly at support@dhtmlx.com ) Attachments (1)
Answer posted by Marcos Carmello on Oct 29, 2008 06:58 The problem persist... i set content to my tab (a div), create 2 or more tabs, and, when close one, my content (div) disappear and cause this error: this._content[tab.idd].parentNode is null _showHover()()dhtmlxtabbar.js (linha 72) this._hideRowScroller(row)};dhtmlXTabBa...(row.tabCount==0)&&(this.rows.length>1)) Answer posted by Support on Oct 29, 2008 07:18 The issue can't be reconstructed. Original fix , resolved situation with not removed ID from inner collections ( which has not any visible effects ) According to stack trace, while removing tab in your case, tabbar tries to select some sibling tab - but can't locate it correctly. Please check that each tab has unique ID. If issue still occurs - please provide any kind of sample where issue can be reconstructed ( you can send it directly to support@dhtmlx.com ) Answer posted by Marcos Carmello on Oct 29, 2008 11:30 The solution is create a div in runtime? How to i do it? Answer posted by Support on Oct 30, 2008 05:04 Instead of <div id="objNewtab" style="display:none"> Here is some content </div> a_tabbar.setContent(dt,content); You can use a_tabbar.setContentHTML(dt,"Here is some content"); Answer posted by Marcos Carmello on Oct 30, 2008 06:44 Thanks. My solution (works): function newTab() { var dt = new Date( ).valueOf(); a_tabbar.enableTabCloseButton(true); a_tabbar.addTab(dt,'Newtab','200px',0,0); a_tabbar.setTabActive(dt, true); newDiv('obj'+dt); a_tabbar.setContent(dt,'obj'+dt); } function newDiv(id){ if (document.createElement){ var content = document.getElementById('alldivs'); var divn = document.createElement('div'); divn.setAttribute('type', 'div'); divn.setAttribute('id', id); var divntext = document.createTextNode('Text here'); divn.appendChild(divntext); content.appendChild(divn); } } Tks for all! |