Skip to content

Commit 76c6e4a

Browse files
committed
Disable no-scroll for lightbox
This causes layout shifts in its current version.
1 parent 2fcc269 commit 76c6e4a

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

js/lightbox.min.js

+1-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/js/lightbox.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ function fcn_showLightbox(target) {
4343
img.removeAttribute('height');
4444
img.removeAttribute('width');
4545
fcn_lightboxTarget.appendChild(img);
46-
fcn_theBody.classList.add('no-scroll');
46+
// fcn_theBody.classList.add('no-scroll');
4747
fcn_lightbox.classList.add('show');
4848

4949
let close = fcn_lightbox.querySelector('.lightbox__close');
@@ -91,7 +91,7 @@ document.querySelectorAll('.lightbox__close, .lightbox').forEach(element => {
9191
e => {
9292
if (e.target.tagName != 'IMG') {
9393
// Restore default view
94-
fcn_theBody.classList.remove('no-scroll');
94+
// fcn_theBody.classList.remove('no-scroll');
9595
fcn_lightbox.classList.remove('show');
9696

9797
// Restore last tab focus

0 commit comments

Comments
 (0)