Change loading order so tab widget is in DOM before loading children. Matches other widgets, and avoids errors in CKEditor which needs the DOMNode to be in the tree.

This commit is contained in:
Nathan Gray 2014-02-11 22:44:06 +00:00
parent 5450085a54
commit eb8ea32d97

View File

@ -222,13 +222,16 @@ var et2_tabbox = et2_valueWidget.extend([et2_IInput],
// Specially process the selected index so it shows up right away
this._loadTab(this.selected_index,promises);
// We can do this and not wind up with 2 because child is a template,
// which has special handling
this._children[0].loadingFinished();
// Apply parent now, which actually puts into the DOM
// This has to be before loading the child, so the dom sub-tree is not
// disconnected, which causes problems for things like CKEditor
this._super.apply(this, arguments);
// We can do this and not wind up with 2 because child is a template,
// which has special handling
this._children[0].loadingFinished(promises);
// Defer parsing & loading of other tabs until later
window.setTimeout(function() {
for (var i = 0; i < tabs.tabData.length; i++)