diff --git a/api/js/etemplate/Et2Select/Select/Et2SelectCategory.ts b/api/js/etemplate/Et2Select/Select/Et2SelectCategory.ts index 7e34118af0..7b2f7932e8 100644 --- a/api/js/etemplate/Et2Select/Select/Et2SelectCategory.ts +++ b/api/js/etemplate/Et2Select/Select/Et2SelectCategory.ts @@ -104,7 +104,7 @@ export class Et2SelectCategory extends Et2StaticSelectMixin(Et2TreeDropdown) const box = this.shadowRoot?.querySelector('.tree-dropdown__combobox'); if(box) { - this.egw().tooltipUnbind(box, this.egw().lang(this.statustext)); + this.egw().tooltipUnbind(box); } } diff --git a/api/js/etemplate/Et2Widget/Et2Widget.ts b/api/js/etemplate/Et2Widget/Et2Widget.ts index 577492d9c0..9863d19eee 100644 --- a/api/js/etemplate/Et2Widget/Et2Widget.ts +++ b/api/js/etemplate/Et2Widget/Et2Widget.ts @@ -804,12 +804,11 @@ const Et2WidgetMixin = (superClass : T) => // Clear any deferred properties, functions may live in here this._deferred_properties = {}; - // Not really needed, use the disconnectedCallback() and let the browser handle it - // Call the destructor of all children so any legacy widgets get destroyed for(let i = this.getChildren().length - 1; i >= 0; i--) { this.getChildren()[i].destroy(); + this.getChildren()[i] instanceof Et2WidgetClass && (this.getChildren()[i]).remove(); } // Free the array managers if they belong to this widget diff --git a/api/js/etemplate/et2_core_widget.ts b/api/js/etemplate/et2_core_widget.ts index 96b4924ded..a0cd54d2f2 100644 --- a/api/js/etemplate/et2_core_widget.ts +++ b/api/js/etemplate/et2_core_widget.ts @@ -301,12 +301,14 @@ export class et2_widget extends ClassWithAttributes { this._children[i].destroy(); } + this._children.splice(0, this._children.length); // Remove this element from the parent, if it exists if(typeof this._parent != "undefined" && this._parent !== null && this._parent instanceof et2_widget) { this._parent.removeChild(this); } + this._parent = null; // Free the array managers if they belong to this widget for (var key in this._mgrs) diff --git a/api/js/etemplate/et2_extension_customfields.ts b/api/js/etemplate/et2_extension_customfields.ts index 9c415828b1..ff2768f322 100644 --- a/api/js/etemplate/et2_extension_customfields.ts +++ b/api/js/etemplate/et2_extension_customfields.ts @@ -249,6 +249,7 @@ export class et2_customfields_list extends et2_valueWidget implements et2_IDetac this.widgets = {}; this.detachedNodes = []; this.tbody = null; + this.table = null; } /** diff --git a/api/js/etemplate/et2_extension_nextmatch_rowProvider.ts b/api/js/etemplate/et2_extension_nextmatch_rowProvider.ts index 55b4bd7389..e325665c84 100644 --- a/api/js/etemplate/et2_extension_nextmatch_rowProvider.ts +++ b/api/js/etemplate/et2_extension_nextmatch_rowProvider.ts @@ -61,8 +61,11 @@ export class et2_nextmatch_rowProvider destroy() { this._rowProvider.destroy(); + this._rowProvider = null; this._subgridCallback = null; this._context = null; + this._rootWidget = null; + this._template = null; this._dataRow = null; }