diff --git a/api/js/etemplate/Et2Widget/Et2Widget.ts b/api/js/etemplate/Et2Widget/Et2Widget.ts index 540d765680..bab36245ec 100644 --- a/api/js/etemplate/Et2Widget/Et2Widget.ts +++ b/api/js/etemplate/Et2Widget/Et2Widget.ts @@ -1344,6 +1344,16 @@ function transformAttributes(widget, mgr : et2_arrayMgr, attributes) { const widget_class = window.customElements.get(widget.localName); + + // Special case attributes + if(attributes.width) + { + widget.style.setProperty("width", attributes.width); + widget.style.setProperty("flex", "0 0 auto"); + delete attributes.width; + console.log("Widget sets width via attribute. We want to avoid this - use CSS instead.", widget); + } + // Apply any set attributes - widget will do its own coercion for(let attribute in attributes) {