Put Et2Description content into light DOM to fix decrypt on hover

This commit is contained in:
nathan 2022-04-12 16:28:36 -06:00
parent b9892687e9
commit 0f362f9717
2 changed files with 14 additions and 1 deletions

View File

@ -19,6 +19,10 @@ export class Et2Description extends Et2Widget(LitElement) implements et2_IDetach
static get styles() static get styles()
{ {
/**
* No styles for Et2Description due to how we're rendering content directly into light DOM
* anything added here won't work
*/
return [ return [
...super.styles, ...super.styles,
css` css`
@ -150,6 +154,15 @@ export class Et2Description extends Et2Widget(LitElement) implements et2_IDetach
return html`${render}`; return html`${render}`;
} }
/**
* Put everything into the light DOM
* @returns {this}
*/
createRenderRoot()
{
return this;
}
async firstUpdated() async firstUpdated()
{ {
this.removeEventListener('click.extra_link', this._handleClick); this.removeEventListener('click.extra_link', this._handleClick);

View File

@ -231,7 +231,7 @@ div.et2_hbox > div {
/** /**
* Label widget, and labels for other widgets * Label widget, and labels for other widgets
*/ */
.et2_label { .et2_label, et2-description {
color: #101050; color: #101050;
white-space: pre-wrap; white-space: pre-wrap;
} }