From fc1d6410931e3b405d51ae608882f1795598805b Mon Sep 17 00:00:00 2001 From: ralf Date: Fri, 5 Apr 2024 17:23:32 +0200 Subject: [PATCH] fix tree doubles when you close and reopen admin tab, or any other tab which moves web-components into the sidebox menu --- api/js/etemplate/Et2Widget/Et2Widget.ts | 3 +++ 1 file changed, 3 insertions(+) diff --git a/api/js/etemplate/Et2Widget/Et2Widget.ts b/api/js/etemplate/Et2Widget/Et2Widget.ts index f4af4e337b..6c6430191f 100644 --- a/api/js/etemplate/Et2Widget/Et2Widget.ts +++ b/api/js/etemplate/Et2Widget/Et2Widget.ts @@ -641,6 +641,9 @@ const Et2WidgetMixin = (superClass : T) => delete this._mgrs[key]; } } + + // if widget exists DOM-wise outside the parent, we need to explicitly remove it + if (this._parent_node) this.remove(); } isInTree() : boolean