diff --git a/api/js/etemplate/Et2InputWidget/Et2InputWidget.ts b/api/js/etemplate/Et2InputWidget/Et2InputWidget.ts index c206b0c983..2e32021e5c 100644 --- a/api/js/etemplate/Et2InputWidget/Et2InputWidget.ts +++ b/api/js/etemplate/Et2InputWidget/Et2InputWidget.ts @@ -373,15 +373,25 @@ const Et2InputWidgetMixin = >(superclass : T) this.label = pre; if(post?.trim().length > 0) { - const label = document.createElement("et2-description"); - label.innerText = post; - // Put in suffix, if parent has a suffix slot - if(this.parentNode?.shadowRoot?.querySelector("slot[name='suffix']")) - { - label.slot = "suffix"; - } + const update = () => { + const label = document.createElement("et2-description"); + label.innerText = post; + // Put in suffix, if parent has a suffix slot + if(this.parentNode?.shadowRoot?.querySelector("slot[name='suffix']")) + { + label.slot = "suffix"; + } - this.parentNode.append(label); + this.parentNode.append(label); + } + if (this.parentNode) + { + update(); + } + else + { + window.setTimeout(update, 1); + } } }