We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 62bbf92 commit 4219985Copy full SHA for 4219985
2 files changed
public/js/lib/renderer/lightbox/index.js
@@ -24,6 +24,7 @@ function findOrCreateLightboxContainer () {
24
const hideContainer = (e) => {
25
e.stopPropagation()
26
lightBoxContainer.classList.remove('show')
27
+ document.body.classList.remove('no-scroll')
28
}
29
30
lightBoxContainer.querySelector('.lightbox-control-previous').addEventListener('click', (e) => {
@@ -71,6 +72,7 @@ function onClickImage (img) {
71
72
setImageInner(img, lightBoxContainer)
73
74
lightBoxContainer.classList.add('show')
75
+ document.body.classList.add('no-scroll')
76
77
currentImage = img
78
updateLightboxImages()
public/js/lib/renderer/lightbox/lightbox.css
@@ -62,3 +62,7 @@
62
.markdown-body img.md-image {
63
cursor: zoom-in;
64
65
+
66
+body.no-scroll {
67
+ overflow: hidden;
68
+}
0 commit comments