From cad07e941454c66bab8ff3ed3426d83e7bfc97eb Mon Sep 17 00:00:00 2001 From: Pablo <47283527+PabloSR06@users.noreply.github.com> Date: Wed, 20 Sep 2023 16:10:39 +0100 Subject: [PATCH] fix: resourceManager copyUrl --- .../actions/dnn-action-copy-url/dnn-action-copy-url.tsx | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/DNN Platform/Modules/ResourceManager/ResourceManager.Web/src/components/actions/dnn-action-copy-url/dnn-action-copy-url.tsx b/DNN Platform/Modules/ResourceManager/ResourceManager.Web/src/components/actions/dnn-action-copy-url/dnn-action-copy-url.tsx index b9cec6e4bb8..2e2557cdcbb 100644 --- a/DNN Platform/Modules/ResourceManager/ResourceManager.Web/src/components/actions/dnn-action-copy-url/dnn-action-copy-url.tsx +++ b/DNN Platform/Modules/ResourceManager/ResourceManager.Web/src/components/actions/dnn-action-copy-url/dnn-action-copy-url.tsx @@ -12,8 +12,13 @@ export class DnnActionCopyUrl { @Prop() items!: Item[]; private handleClick(): void { - const url = `${window.location.protocol}//${window.location.host}${this.items[0].path}`; - navigator.clipboard.writeText(url); + let t; + if (this.items[0].path.includes(":")) { + t = `${this.items[0].path}`; + } else { + t = `${window.location.protocol}//${window.location.host}${this.items[0].path}`; + } + navigator.clipboard.writeText(t); } render() {