From 66ee3687b6bda77612e62b8a4ee9eb14dfd8e806 Mon Sep 17 00:00:00 2001 From: nathan Date: Mon, 9 May 2022 10:02:07 -0600 Subject: [PATCH] Fix widgets couldn't change statustext once set --- api/js/etemplate/Et2Widget/Et2Widget.ts | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/api/js/etemplate/Et2Widget/Et2Widget.ts b/api/js/etemplate/Et2Widget/Et2Widget.ts index 5e0c2b72fc..d53cf7c8ca 100644 --- a/api/js/etemplate/Et2Widget/Et2Widget.ts +++ b/api/js/etemplate/Et2Widget/Et2Widget.ts @@ -287,7 +287,6 @@ const Et2WidgetMixin = (superClass) => { let oldValue = this.__statustext; this.__statustext = value; - this.egw().tooltipBind(this, this.__statustext); this.requestUpdate("statustext", oldValue); } @@ -377,6 +376,14 @@ const Et2WidgetMixin = (superClass) => { this._set_label(this.label); } + if(changedProperties.has("statustext")) + { + this.egw().tooltipUnbind(this); + if(this.statustext) + { + this.egw().tooltipBind(this, this.statustext); + } + } } /**