mirror of
https://github.com/wekan/wekan.git
synced 2025-04-24 14:08:31 -04:00
Merge pull request #3661 from Majed6/copy_href
Fixed Bug: copy to clipboard uses pathname
This commit is contained in:
commit
23e349d277
2 changed files with 2 additions and 1 deletions
|
@ -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
|
||||
|
|
|
@ -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();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue