From 24bb8ffebf4148eb9deeb9e58c633c981c2d56f2 Mon Sep 17 00:00:00 2001 From: nathan <nathangray.bsc+github@gmail.com> Date: Tue, 4 Apr 2023 14:08:24 -0600 Subject: [PATCH] Et2Description: Fix urls from activateLinks did not open properly --- api/js/etemplate/Et2Description/Et2Description.ts | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/api/js/etemplate/Et2Description/Et2Description.ts b/api/js/etemplate/Et2Description/Et2Description.ts index e10c4f90a4..6aa4ede4d2 100644 --- a/api/js/etemplate/Et2Description/Et2Description.ts +++ b/api/js/etemplate/Et2Description/Et2Description.ts @@ -222,10 +222,18 @@ export class Et2Description extends Et2Widget(LitElement) implements et2_IDetach if(this.mimeData || this.href) { + egw(window).open_link(this.mimeData || this.href, this.extraLinkTarget, this.extraLinkPopup, null, null, this.mime); + _ev.preventDefault(); + return false; } - _ev.preventDefault(); - return false; + else if(_ev.target.nodeName !== "A") + { + // If it's not an activated link, just stop + _ev.preventDefault(); + return false; + } + // Let links (present if activateLinks = true) do their thing normally } protected wrapLink(href, value)