From b25463b084b2be5398feb3abdc3680e38c3d159e Mon Sep 17 00:00:00 2001 From: peaklabs-dev <122374094+peaklabs-dev@users.noreply.github.com> Date: Fri, 13 Dec 2024 14:05:31 +0100 Subject: [PATCH] fix: maybe fallback is now working --- .../views/components/modal-confirmation.blade.php | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/resources/views/components/modal-confirmation.blade.php b/resources/views/components/modal-confirmation.blade.php index 4620d35ed..94f1f84f4 100644 --- a/resources/views/components/modal-confirmation.blade.php +++ b/resources/views/components/modal-confirmation.blade.php @@ -92,9 +92,8 @@ }); }, copyConfirmationText() { - const textToCopy = this.confirmationText; if (navigator.clipboard && window.isSecureContext) { - navigator.clipboard.writeText(textToCopy) + navigator.clipboard.writeText(this.confirmationText) .then(() => { this.copied = true; setTimeout(() => { @@ -103,9 +102,10 @@ }); } else { const textarea = document.createElement('textarea'); - textarea.value = textToCopy; - textarea.style.position = 'fixed'; - textarea.style.opacity = '0'; + textarea.value = this.confirmationText; + textarea.style.position = 'absolute'; + textarea.style.left = '-9999px'; + textarea.style.top = '0'; document.body.appendChild(textarea); textarea.select(); try {