0
0
mirror of https://github.com/twbs/bootstrap.git synced 2025-01-18 10:52:19 +01:00

Fix StackBlitz edit feature by selecting the closest example

This commit is contained in:
Julien Déramond 2022-03-30 14:14:00 +02:00 committed by GeoSot
parent 6b4bdcc657
commit bef4f3b6c6

View File

@ -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)
})