0
0
mirror of https://github.com/twbs/bootstrap.git synced 2025-02-26 23:54:23 +01:00

Fix clipboard code (#38380)

This commit is contained in:
Patrick H. Lauke 2023-03-30 14:03:48 +01:00 committed by GitHub
parent 3ba7ca4f75
commit 74c6f2bcfb
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -53,7 +53,7 @@
const clipboard = new ClipboardJS('.btn-clipboard', { const clipboard = new ClipboardJS('.btn-clipboard', {
target: trigger => trigger.closest('.bd-code-snippet').querySelector('.highlight'), target: trigger => trigger.closest('.bd-code-snippet').querySelector('.highlight'),
text: trigger => trigger.parentNode.nextElementSibling.textContent.trimEnd() text: trigger => trigger.closest('.bd-code-snippet').querySelector('.highlight').textContent.trimEnd()
}) })
clipboard.on('success', event => { clipboard.on('success', event => {