mirror of
https://github.com/status-im/codimd.git
synced 2025-02-04 22:03:28 +00:00
Fix body scrolling in published page
Signed-off-by: Yukai Huang <yukaihuangtw@gmail.com>
This commit is contained in:
parent
62bbf928b7
commit
4219985658
@ -24,6 +24,7 @@ function findOrCreateLightboxContainer () {
|
||||
const hideContainer = (e) => {
|
||||
e.stopPropagation()
|
||||
lightBoxContainer.classList.remove('show')
|
||||
document.body.classList.remove('no-scroll')
|
||||
}
|
||||
|
||||
lightBoxContainer.querySelector('.lightbox-control-previous').addEventListener('click', (e) => {
|
||||
@ -71,6 +72,7 @@ function onClickImage (img) {
|
||||
setImageInner(img, lightBoxContainer)
|
||||
|
||||
lightBoxContainer.classList.add('show')
|
||||
document.body.classList.add('no-scroll')
|
||||
|
||||
currentImage = img
|
||||
updateLightboxImages()
|
||||
|
@ -62,3 +62,7 @@
|
||||
.markdown-body img.md-image {
|
||||
cursor: zoom-in;
|
||||
}
|
||||
|
||||
body.no-scroll {
|
||||
overflow: hidden;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user