diff --git a/app/javascript/vue/shareable_links/components/shareable_link_modal.vue b/app/javascript/vue/shareable_links/components/shareable_link_modal.vue index bc23e37d5..c41815d2f 100644 --- a/app/javascript/vue/shareable_links/components/shareable_link_modal.vue +++ b/app/javascript/vue/shareable_links/components/shareable_link_modal.vue @@ -71,7 +71,7 @@ :disabled="true" /> @@ -158,8 +158,8 @@ hideModal() { $(this.$refs.modal).modal('hide'); }, - copy() { - navigator.clipboard.writeText(this.$refs.clone.value); + copy(value) { + navigator.clipboard.writeText(value); HelperModule.flashAlertMsg(this.i18n.t('shareable_links.modal.copy_success'), 'success'); }, saveDescription() { @@ -198,6 +198,7 @@ $.post(this.shareableLinkUrl, { description: this.description }, (result) => { this.shareableData = result.data; this.$emit('enable'); + this.copy(this.shareableData.attributes.shareable_url); }); } else { this.hideModal();