fix strange (wrong height and styled) textboxes in CF's

This commit is contained in:
ralf 2022-08-24 08:47:53 +02:00
parent 19d4b9a8b6
commit dfba1bba9c

View File

@ -309,7 +309,6 @@ export class et2_customfields_list extends et2_valueWidget implements et2_IDetac
}
}
// Create widget
if(window.customElements.get('et2-' + type))
{
if (typeof attrs.needed !== 'undefined')
@ -317,6 +316,11 @@ export class et2_customfields_list extends et2_valueWidget implements et2_IDetac
attrs.required = attrs.needed;
delete attrs.needed;
}
if (typeof attrs.size !== 'undefined' && ['small', 'medium', 'large'].indexOf(attrs.size) === -1)
{
if (attrs.size > 0) attrs.width = attrs.size+'em';
delete attrs.size;
}
//this.widgets[field_name] = loadWebComponent('et2-' + type, attrs, null);
// et2_extension_customfields.getDOMNode() needs webcomponent to have ID before it can put it in
let wc = <LitElement>loadWebComponent('et2-' + type, attrs, this);