mirror of
https://github.com/Hopiu/bootstrap.git
synced 2026-05-22 10:21:51 +00:00
Fix clipboard code (#38380)
This commit is contained in:
parent
3ba7ca4f75
commit
74c6f2bcfb
1 changed files with 1 additions and 1 deletions
|
|
@ -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 => {
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue