Skip to content

Commit

Permalink
Docs: fix clipboard icon visibility issue after multiple clicks (#40917)
Browse files Browse the repository at this point in the history
Co-authored-by: Julien Déramond <[email protected]>
  • Loading branch information
MohamadSalman11 and julien-deramond authored Feb 9, 2025
1 parent b7f3d6a commit c5be828
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions site/assets/js/partials/code-examples.js
Original file line number Diff line number Diff line change
Expand Up @@ -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', () => {
Expand Down

0 comments on commit c5be828

Please sign in to comment.