aboutsummaryrefslogtreecommitdiff
path: root/site/layouts/partials/scripts.html
diff options
context:
space:
mode:
authorJulien Déramond <[email protected]>2022-03-30 14:14:00 +0200
committerGeoSot <[email protected]>2022-03-31 14:04:57 +0300
commitbef4f3b6c6d04ff8363ead0b1d9a88aad4b0a170 (patch)
treeacb9fe8a5837fbe1c4aabb21fdd92bf4056f6891 /site/layouts/partials/scripts.html
parent6b4bdcc657da41838988765e6defc2032d17a4ee (diff)
downloadbootstrap-bef4f3b6c6d04ff8363ead0b1d9a88aad4b0a170.tar.xz
bootstrap-bef4f3b6c6d04ff8363ead0b1d9a88aad4b0a170.zip
Fix StackBlitz edit feature by selecting the closest example
Diffstat (limited to 'site/layouts/partials/scripts.html')
-rw-r--r--site/layouts/partials/scripts.html2
1 files changed, 1 insertions, 1 deletions
diff --git a/site/layouts/partials/scripts.html b/site/layouts/partials/scripts.html
index 0724a39ee..47cc55dff 100644
--- a/site/layouts/partials/scripts.html
+++ b/site/layouts/partials/scripts.html
@@ -26,7 +26,7 @@
document.querySelectorAll('.btn-edit')
.forEach(function (btn) {
btn.addEventListener('click', function (event) {
- var htmlSnippet = event.target.closest('.bd-content').querySelector('.bd-example').innerHTML
+ var htmlSnippet = event.target.closest('.bd-edit').previousSibling.innerHTML
StackBlitzSDK.openBootstrapSnippet(htmlSnippet)
})