How can I stop autoscrolling when switching between variants on Spotlight Theme?

Solved

How can I stop autoscrolling when switching between variants on Spotlight Theme?

clothingjoga
New Member
5 0 0

Hello 

when I switch between variants the page is autoscrolling ( see in the video) How can I fix this? Spotlight Theme.

Accepted Solution (1)
Dan-From-Ryviu
Shopify Partner
9581 1926 1962

This is an accepted solution.

Hi @clothingjoga 

Could you change option Desktop layout in your Online store > Themes > Customize > Products > Default product to Thumbnail carousel and then check if it solve this issue.

Screenshot 2023-11-27 at 09.51.11.png

 

- Helpful? Like and Accept solution! or Buy me coffee
- Ryviu - Reviews & QA app: Collect product reviews, import reviews from AliExpress, Amazon, Etsy, Walmart, Shopee, Dhgate and CSV.
- Lookfy Gallery: Lookbook Image: Easy and fast to create Photo Gallery, Lookbook, Shop The Look.
- Ryviu: Aliexpress Reviews - AliExpress Reviews Importer, one-click import aliexpress reviews, export reviews to CSV file.
- Reelfy‑Shoppable Videos+Reels: Create shoppable videos to engage customers and drive more sales.
- Enjoy 1 month of Shopify for $1. Sign up now.

View solution in original post

Replies 8 (8)

Dan-From-Ryviu
Shopify Partner
9581 1926 1962

Could you drop your product URL to check?

- Helpful? Like and Accept solution! or Buy me coffee
- Ryviu - Reviews & QA app: Collect product reviews, import reviews from AliExpress, Amazon, Etsy, Walmart, Shopee, Dhgate and CSV.
- Lookfy Gallery: Lookbook Image: Easy and fast to create Photo Gallery, Lookbook, Shop The Look.
- Ryviu: Aliexpress Reviews - AliExpress Reviews Importer, one-click import aliexpress reviews, export reviews to CSV file.
- Reelfy‑Shoppable Videos+Reels: Create shoppable videos to engage customers and drive more sales.
- Enjoy 1 month of Shopify for $1. Sign up now.

clothingjoga
New Member
5 0 0
Dan-From-Ryviu
Shopify Partner
9581 1926 1962

This is an accepted solution.

Hi @clothingjoga 

Could you change option Desktop layout in your Online store > Themes > Customize > Products > Default product to Thumbnail carousel and then check if it solve this issue.

Screenshot 2023-11-27 at 09.51.11.png

 

- Helpful? Like and Accept solution! or Buy me coffee
- Ryviu - Reviews & QA app: Collect product reviews, import reviews from AliExpress, Amazon, Etsy, Walmart, Shopee, Dhgate and CSV.
- Lookfy Gallery: Lookbook Image: Easy and fast to create Photo Gallery, Lookbook, Shop The Look.
- Ryviu: Aliexpress Reviews - AliExpress Reviews Importer, one-click import aliexpress reviews, export reviews to CSV file.
- Reelfy‑Shoppable Videos+Reels: Create shoppable videos to engage customers and drive more sales.
- Enjoy 1 month of Shopify for $1. Sign up now.

BSS-Commerce
Shopify Partner
3477 463 539

Hi @clothingjoga ,

 

You can try using the following solution

In Online store, select Themes -> More -> Edit code

view - 2023-11-22T085756.590.png

In the media-gallery.js file, press Ctrl + F and search for the phrase scrollTo and comment on the code line as shown in the image, click Save to save the changes.

view - 2023-11-22T085934.780.png

If you still have problems, you can search for similar phrases: scrollTo, scrollIntoView,... in other .js files and comment with // and check if the problem still exists or not

Hope my answer will help you. @clothingjoga 

If our suggestions are useful, please let us know by giving it a like, marking it as a solution, or donating here .


B2B Solution & Custom Pricing | Product Labels by BSS


Need help from our expert? Kindly share your request with us via [email protected]


BSS Commerce - Full-service eCommerce Agency
clothingjoga
New Member
5 0 0

Thanks for your try, but there is still the same problem. Any other ideas?

BSS-Commerce
Shopify Partner
3477 463 539

Hey @clothingjoga ,

 

If your problem persists, you can try one of the following two solutions:

1. In the file media-gallery.js, find the line of code:

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

Replace with the following line of code:

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

 Click Save to save changes

 

2. In the theme.liquid file, add the following code before the {% endstyle %} tag

<script>
  $(document).ready(function(){
    $('select, input[type="radio"]').on('change', function() {
       var currentPos = $(window).scrollTop();
       setTimeout(() => {
         $('html, body').scrollTop(currentPos);
       },100)
    });
  });
</script>

Click Save to save changes

Hope these solutions will help you @clothingjoga 

If our suggestions are useful, please let us know by giving it a like, marking it as a solution, or donating here .


B2B Solution & Custom Pricing | Product Labels by BSS


Need help from our expert? Kindly share your request with us via [email protected]


BSS Commerce - Full-service eCommerce Agency
clothingjoga
New Member
5 0 0

Screenshot 2023-11-23 183216.png

 Is this the right position? When yes, it is not working.

BSS-Commerce
Shopify Partner
3477 463 539

Looks like I made a mistake, the correct place to add that code is before the </head> tag, not the {% endstyle %} tag. I'm very sorry about this mistake of mine.

Hopefully changing this solution will work on your store.

If our suggestions are useful, please let us know by giving it a like, marking it as a solution, or donating here .


B2B Solution & Custom Pricing | Product Labels by BSS


Need help from our expert? Kindly share your request with us via [email protected]


BSS Commerce - Full-service eCommerce Agency