My Image Gallery Slider has a feature that uses ScrollIntoView() for its thumbnails, but whenever I scroll up or down the page and a new thumbnail is selected, it brings the entire page back to the location of that thumbnail. Is there a way to turn off this scrollIntoView() functionality? You can check out the project here: https://codepen.io/abcretrograde/pen/povVxVq
function updateImage() {
const thumbs = document.querySelectorAll(
"#jsSlideshow .js-slideshow__thumb-image"
);
clearInterval(autoUpdate);
autoUpdate = setInterval(() => {
incImage();
}, slideSpeed);
const newOffset = getImagePos(imageWidthArray, whichImage);
slideshow.style.setProperty("--offset", newOffset + "px");
thumbs.forEach((thumb) => {
thumb.classList.remove("js-slideshow__thumb-image--selected");
});
thumbs[whichImage].classList.add("js-slideshow__thumb-image--selected");
thumbs[whichImage].scrollIntoView({
behavior: "auto",
block: 'center',
inline: "center",
});
}