From fa5dcc2a3cf8117b7a48211b441224172403d2fe Mon Sep 17 00:00:00 2001 From: nathan Date: Fri, 17 Sep 2021 13:12:24 -0600 Subject: [PATCH] Fix uneeded remove & re-add of WebComponent widgets to legacy parent This fixes the incorrect vertical ordering of the preferences dialog (was tabs, header, footer ) --- api/js/etemplate/Et2Widget/Et2Widget.ts | 3 ++- api/js/etemplate/et2_core_widget.ts | 6 ------ 2 files changed, 2 insertions(+), 7 deletions(-) diff --git a/api/js/etemplate/Et2Widget/Et2Widget.ts b/api/js/etemplate/Et2Widget/Et2Widget.ts index 1508552246..057164e2e7 100644 --- a/api/js/etemplate/Et2Widget/Et2Widget.ts +++ b/api/js/etemplate/Et2Widget/Et2Widget.ts @@ -9,6 +9,7 @@ import type {IegwAppLocal} from "../../jsapi/egw_global"; import {ClassWithAttributes, ClassWithInterfaces} from "../et2_core_inheritance"; import {css, dedupeMixin} from "@lion/core"; import type {et2_container} from "../et2_core_baseWidget"; +import type {et2_DOMWidget} from "../et2_core_DOMWidget"; /** * This mixin will allow any LitElement to become an Et2Widget @@ -604,7 +605,7 @@ const Et2WidgetMixin = (superClass) => * rest themselves with their normal lifecycle (especially connectedCallback(), which is kind * of the equivalent of doLoadingFinished() */ - if(this.getParent() instanceof et2_widget && this.getParent().getDOMNode(this)) + if(this.getParent() instanceof et2_widget && (this.getParent()).getDOMNode(this) != this.parentNode) { this.getParent().getDOMNode(this).append(this); } diff --git a/api/js/etemplate/et2_core_widget.ts b/api/js/etemplate/et2_core_widget.ts index d7e4acf8c8..445fc6edca 100644 --- a/api/js/etemplate/et2_core_widget.ts +++ b/api/js/etemplate/et2_core_widget.ts @@ -804,12 +804,6 @@ export class et2_widget extends ClassWithAttributes else { widget = loadWebComponent(_nodeName, _node, this); - - if (this.addChild) - { - // webcomponent going into old et2_widget - this.addChild(widget); - } } return widget; }