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:
parent
6b4bdcc657
commit
bef4f3b6c6
@ -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)
|
||||
})
|
||||
|
Loading…
x
Reference in New Issue
Block a user