Commit a7e7f089 authored by minseok.park's avatar minseok.park

update backdrop click event

parent 74ea2f01
Pipeline #19373 failed with stages
in 1 minute and 16 seconds
......@@ -26,6 +26,10 @@
z-index: 2;
}
.backdrop.is-active{
display: block;
}
.page-versions h2.title {
color: var(--nav-heading-font-color);
font-size: inherit;
......
......@@ -9,15 +9,17 @@
toggle.addEventListener('click', function (e) {
selector.classList.toggle('is-active')
backdrop.style.display = 'block'
backdrop.classList.toggle('is-active')
e.stopPropagation() // trap event
})
backdrop.addEventListener('click', function () {
selector.classList.remove('is-active')
backdrop.classList.remove('is-active')
})
document.documentElement.addEventListener('click', function () {
selector.classList.remove('is-active')
backdrop.classList.remove('is-active')
})
})()
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment