From 5a478607dc335f91151ffb9e039d604e46e0f5f4 Mon Sep 17 00:00:00 2001 From: Umar Bolatov Date: Thu, 24 Feb 2022 22:03:34 -0800 Subject: [PATCH] Fix "Copy Link" button on pull payment and payment request pages close #3499 --- BTCPayServer/wwwroot/js/copy-to-clipboard.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/BTCPayServer/wwwroot/js/copy-to-clipboard.js b/BTCPayServer/wwwroot/js/copy-to-clipboard.js index cc9d9ef4f..ab72d7dc0 100644 --- a/BTCPayServer/wwwroot/js/copy-to-clipboard.js +++ b/BTCPayServer/wwwroot/js/copy-to-clipboard.js @@ -7,7 +7,7 @@ const confirmCopy = (el, message) => { window.copyToClipboard = function (e, data) { e.preventDefault(); - const item = e.target.closest('[data-clipboard]') || e.target.closest('[data-clipboard-target]'); + const item = e.target.closest('[data-clipboard]') || e.target.closest('[data-clipboard-target]') || e.target; const confirm = item.querySelector('[data-clipboard-confirm]') || item; const message = confirm.getAttribute('data-clipboard-confirm') || 'Copied ✔'; if (!confirm.dataset.clipboardInitial) {