Skip to content

Commit

Permalink
Fix: clipboard icon not showing after multiple press
Browse files Browse the repository at this point in the history
  • Loading branch information
MohamadSalman11 committed Oct 7, 2024
1 parent d07536f commit 77c4fed
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 77c4fed

Please sign in to comment.