Do not change XMLNode, that changes the cached template. Clone it, then change it to avoid weird side effects.

This commit is contained in:
nathangray 2017-04-19 12:51:58 -06:00
parent b193bb0692
commit 3ea4fda227

View File

@ -283,6 +283,8 @@ var et2_tabbox = (function(){ "use strict"; return et2_valueWidget.extend([et2_I
if(tabData.hidden) if(tabData.hidden)
{ {
// Set hidden tab to readonly, so widgets aren't active // Set hidden tab to readonly, so widgets aren't active
// Do not modify the XMLNode, or the change will be cached for all
tabData.XMLNode = tabData.XMLNode.cloneNode();
tabData.XMLNode.setAttribute('readonly', true); tabData.XMLNode.setAttribute('readonly', true);
} }
tabData.widget = this.createElementFromNode(tabData.XMLNode,tabData.XMLNode.nodeName.toLowerCase()); tabData.widget = this.createElementFromNode(tabData.XMLNode,tabData.XMLNode.nodeName.toLowerCase());