if (!this.elements.thumbnails || this.dataset.desktopLayout === ‘stacked’) {
activeMedia.scrollIntoView({behavior: ‘smooth’});
}
Replace this with the following code or add two backslashes, “//”, before each line to comment it out. This essentially turns these lines into comments that will not be used to affect your site. If done correctly, these lines will show up as a different color in the js code and the page will no longer shift upon clicking variant options.
//if (!this.elements.thumbnails || this.dataset.desktopLayout === ‘stacked’) {
// activeMedia.scrollIntoView({behavior: ‘smooth’});
//}