Docs: fix clipboard icon visibility issue after multiple clicks (#40917)
Some checks failed
BrowserStack / browserstack (push) Has been skipped
Bundlewatch / bundlewatch (push) Failing after 1s
CodeQL / Analyze (push) Failing after 1s
cspell / cspell (push) Failing after 1s
CSS / css (push) Failing after 1s
Docs / docs (push) Failing after 1s
JS Tests / JS Tests (push) Failing after 1s
Lint / lint (push) Failing after 1s
CSS (node-sass) / css (push) Failing after 1s
Release notes / update_release_draft (push) Has been skipped

Co-authored-by: Julien Déramond <juderamond@gmail.com>
This commit is contained in:
Mohamad Salman 2025-02-09 10:50:20 +01:00 committed by GitHub
parent b7f3d6a6be
commit c5be828d99
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -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', () => {