Why does changing color cause a scrolling glitch in Sense theme?

Topic summary

Selecting a different color/variant in the Shopify Sense theme triggers an unwanted scroll (“scrolling glitch”). A video attachment was provided to illustrate the issue.

Proposed fix:

  • Edit theme code (Online Store > Themes > More actions > Edit code).
  • In media-gallery.js, locate the line: activeMedia.scrollIntoView({ behavior: ‘smooth’ });
  • Comment out or delete that line. Make a theme copy before changes.

Outcome:

  • The original reporter applied the change and confirmed the glitch is resolved.

Current status:

  • Another participant could not find this code in their Sense theme, suggesting possible theme version differences or a different file location. No further guidance or resolution for this case yet. Discussion remains partially open.

Notes:

  • The attached video is central to understanding the exact scrolling behavior.
Summarized with AI on December 25. AI used: gpt-5.

When I choose a different colour/variant it has a little scrolling glitch.

The theme I am using is sense.

If you know the solution to this problem let me know.

See file below for video.

Kind regards

Hi @elronand44

This is Richard from PageFly - Shopify Page Builder App

You can follow my instructions below to get this solved

Step 1: Online Stores > Themes > More Actions > Edit code

Step 2: find the media-gallery.js and comment on this code :

activeMedia.scrollIntoView({ behavior: 'smooth' });

Or you can simply delete it, but before making any changes, you should make a copy theme for it

Hope this can help you solve the issue

Best regards,

Richard | PageFly

Thank you very much for the help.

It works perfect now.

Glad that i can help. LEt me know if you need any questions

hi,
I tried to find this code but its not there in sense theme