fix mobile detection

This commit is contained in:
j 2025-03-28 11:17:37 +00:00
parent f53b99e349
commit 95924e4638

View file

@ -142,7 +142,7 @@ function loadGallery(images, idx, main, thumbnails) {
gallery.querySelectorAll(".thumbnail").forEach((thumb, i) => {
thumb.classList.toggle("active", i === index);
});
if (thumbnailsContainer && thumbnailsContainer(thumbnailsContainer).flexWrap == "nowrap") {
if (thumbnailsContainer && getComputedStyle(thumbnailsContainer).flexWrap == "nowrap") {
gallery.querySelector('.active').scrollIntoView()
}
}