From 8796c468109d953d93e0c17aa696008e9f976675 Mon Sep 17 00:00:00 2001 From: Majed6 <7234719+Majed6@users.noreply.github.com> Date: Thu, 18 Mar 2021 16:48:53 +0300 Subject: [PATCH] Fixed Bug: copy to clipboard uses pathname --- client/components/cards/cardDetails.jade | 1 - client/components/cards/cardDetails.js | 2 ++ 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/client/components/cards/cardDetails.jade b/client/components/cards/cardDetails.jade index bd8a8346a..245ab773d 100644 --- a/client/components/cards/cardDetails.jade +++ b/client/components/cards/cardDetails.jade @@ -12,7 +12,6 @@ template(name="cardDetails") a.fa.fa-link.card-copy-button.js-copy-link( class="fa-link" title="{{_ 'copy-card-link-to-clipboard'}}" - value="{{ originRelativeUrl }}" ) if isMiniScreen a.fa.fa-times-thin.close-card-details-mobile-web.js-close-card-details diff --git a/client/components/cards/cardDetails.js b/client/components/cards/cardDetails.js index 832007f6d..56764d4e4 100644 --- a/client/components/cards/cardDetails.js +++ b/client/components/cards/cardDetails.js @@ -291,6 +291,8 @@ BlazeComponent.extendComponent({ }, 'click .js-copy-link'() { StringToCopyElement = document.getElementById('cardURL_copy'); + StringToCopyElement.value = + window.location.origin + window.location.pathname; StringToCopyElement.select(); if (document.execCommand('copy')) { StringToCopyElement.blur();