From 77c4fedaed26d5a15037f913c175bfc26614d7ad Mon Sep 17 00:00:00 2001 From: MohamadSalman11 Date: Mon, 7 Oct 2024 22:14:15 +0200 Subject: [PATCH] Fix: clipboard icon not showing after multiple press --- site/assets/js/partials/code-examples.js | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/site/assets/js/partials/code-examples.js b/site/assets/js/partials/code-examples.js index d81191a965..06bd8545c6 100644 --- a/site/assets/js/partials/code-examples.js +++ b/site/assets/js/partials/code-examples.js @@ -63,6 +63,11 @@ export default () => { const namespace = 'http://www.w3.org/1999/xlink' const originalXhref = iconFirstChild.getAttributeNS(namespace, 'href') const originalTitle = event.trigger.title + const isCheckIconVisible = originalXhref === '#check2' + + if (isCheckIconVisible) { + return + } tooltipBtn.setContent({ '.tooltip-inner': 'Copied!' }) event.trigger.addEventListener('hidden.bs.tooltip', () => {