From 5b4c93b36a32c4c62dff7dedca65ee0111fc66e0 Mon Sep 17 00:00:00 2001 From: nathan Date: Thu, 3 Feb 2022 13:52:14 -0700 Subject: [PATCH] Fix Et2Description tries to open on click even if href or link are not set --- api/js/etemplate/Et2Description/Et2Description.ts | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/api/js/etemplate/Et2Description/Et2Description.ts b/api/js/etemplate/Et2Description/Et2Description.ts index 24457020f8..29c7c90e2a 100644 --- a/api/js/etemplate/Et2Description/Et2Description.ts +++ b/api/js/etemplate/Et2Description/Et2Description.ts @@ -8,7 +8,7 @@ */ import {Et2Widget} from "../Et2Widget/Et2Widget"; -import {html, css, LitElement} from "@lion/core"; +import {css, html, LitElement} from "@lion/core"; import {et2_IDetachedDOM} from "../et2_core_interfaces"; import {activateLinks} from "../ActivateLinksDirective"; @@ -80,7 +80,8 @@ export class Et2Description extends Et2Widget(LitElement) implements et2_IDetach this.activate_links = false; this.extra_link_popup = ""; this.extra_link_target = "_browser"; - this.href = ""; + // Don't initialize this to avoid href(unknown) when rendered + //this.href = ""; this.value = ""; this._handleClick = this._handleClick.bind(this); @@ -165,7 +166,7 @@ export class Et2Description extends Et2Widget(LitElement) implements et2_IDetach { this._init_blueimp_gallery(_ev, this.href); } - else + else if(this.mime_data || this.href) { egw(window).open_link(this.mime_data || this.href, this.extra_link_target, this.extra_link_popup, null, null, this.mime); }