Fix "Copy Link" button on pull payment and payment request pages

close #3499
This commit is contained in:
Umar Bolatov 2022-02-24 22:03:34 -08:00 committed by Andrew Camilleri
parent 4abc6eb387
commit 5a478607dc

View File

@ -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) {