mirror of
https://github.com/EGroupware/egroupware.git
synced 2024-11-25 09:23:28 +01:00
Fix child order when children are a mix of WebComponent & legacy widgets
This commit is contained in:
parent
6abb239705
commit
b7e34ed779
@ -519,14 +519,16 @@ const Et2WidgetMixin = (superClass) =>
|
||||
this.getParent().getDOMNode(this).append(this);
|
||||
}
|
||||
|
||||
// An empty text node causes problems with legacy widget children
|
||||
// It throws off their insertion indexing, making them get added in the wrong place
|
||||
if(this.childNodes[0]?.nodeType == this.TEXT_NODE)
|
||||
{
|
||||
this.removeChild(this.childNodes[0]);
|
||||
}
|
||||
for(let i = 0; i < this.getChildren().length; i++)
|
||||
{
|
||||
let child = this.getChildren()[i];
|
||||
let child_node = typeof child.getDOMNode !== "undefined" ? child.getDOMNode(child) : null;
|
||||
if(child_node && child_node !== this)
|
||||
{
|
||||
this.append(child_node);
|
||||
}
|
||||
|
||||
child.loadingFinished(promises);
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user