mirror of
https://github.com/aljazceru/btcpayserver.git
synced 2026-01-06 23:54:28 +01:00
Merge pull request #6633 from dennisreimann/fix-6632
UI: Prevent copy to clipboard double-clicks
This commit is contained in:
@@ -1,4 +1,5 @@
|
||||
function confirmCopy(el, message) {
|
||||
if (el.dataset.clipboardConfirming) return;
|
||||
const hasIcon = !!el.innerHTML.match('icon-actions-copy')
|
||||
const confirmHTML = `<span class="text-success">${message}</span>`;
|
||||
if (hasIcon) {
|
||||
@@ -10,7 +11,7 @@ function confirmCopy(el, message) {
|
||||
el.style.minHeight = height + 'px';
|
||||
el.innerHTML = confirmHTML;
|
||||
}
|
||||
el.dataset.clipboardConfirming = true;
|
||||
el.dataset.clipboardConfirming = 'true';
|
||||
if (el.dataset.clipboardHandler) {
|
||||
clearTimeout(parseInt(el.dataset.clipboardHandler));
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user