Skip to content

Commit c5be828

Browse files
Docs: fix clipboard icon visibility issue after multiple clicks (#40917)
Co-authored-by: Julien Déramond <[email protected]>
1 parent b7f3d6a commit c5be828

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

Diff for: site/assets/js/partials/code-examples.js

+5
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,11 @@ export default () => {
6363
const namespace = 'http://www.w3.org/1999/xlink'
6464
const originalXhref = iconFirstChild.getAttributeNS(namespace, 'href')
6565
const originalTitle = event.trigger.title
66+
const isCheckIconVisible = originalXhref === '#check2'
67+
68+
if (isCheckIconVisible) {
69+
return
70+
}
6671

6772
tooltipBtn.setContent({ '.tooltip-inner': 'Copied!' })
6873
event.trigger.addEventListener('hidden.bs.tooltip', () => {

0 commit comments

Comments
 (0)