Solved

Why does adding a product to the cart freeze my mobile site?

dlaurie
Tourist
11 0 1

Hi everyone... I am having problems with the mobile version of my website - visit www.ContemporaryAccentFurniture.com

If you add a product to the cart, the site freezes. You can't scroll up or down or do anything. 

Any suggestions on how to fix this? 

Thanks guys!

 

Accepted Solution (1)

Prabhat
Shopify Expert
83 8 28

This is an accepted solution.

Well I found the issue to be simple 
In your theme click on Edit code > Assets > App.js 
Find the below line of code and comment it all 

//block scrolling on mobile
                if ($(window).width() <= 798) {
                  var $cart_container = $(this).parent();
                  if($cart_container.hasClass('active_link')) {
                    $('body').addClass('blocked-scroll');
                  } else {
                    $('body').addClass('blocked-scroll');
                  }
                }


 And replace it with this 

//block scrolling on mobile
                /* if ($(window).width() <= 798) {
                  var $cart_container = $(this).parent();
                  if($cart_container.hasClass('active_link')) {
                    $('body').addClass('blocked-scroll');
                  } else {
                    $('body').addClass('blocked-scroll');
                  }
                } */

// Commenting whole code 
Solution Expert
- Did I solved your issue? Like & Mark As Solution to help the community

View solution in original post

Replies 8 (8)

Prabhat
Shopify Expert
83 8 28

This is an accepted solution.

Well I found the issue to be simple 
In your theme click on Edit code > Assets > App.js 
Find the below line of code and comment it all 

//block scrolling on mobile
                if ($(window).width() <= 798) {
                  var $cart_container = $(this).parent();
                  if($cart_container.hasClass('active_link')) {
                    $('body').addClass('blocked-scroll');
                  } else {
                    $('body').addClass('blocked-scroll');
                  }
                }


 And replace it with this 

//block scrolling on mobile
                /* if ($(window).width() <= 798) {
                  var $cart_container = $(this).parent();
                  if($cart_container.hasClass('active_link')) {
                    $('body').addClass('blocked-scroll');
                  } else {
                    $('body').addClass('blocked-scroll');
                  }
                } */

// Commenting whole code 
Solution Expert
- Did I solved your issue? Like & Mark As Solution to help the community
dlaurie
Tourist
11 0 1

Oh!! It actually worked! Thanks so much! 

MF16
Visitor
2 0 0

Hi, I am hearing from my viewers that my website freezes and glitches I check myself and on mobile when you try to scroll down it doesn’t let you. How can I fix this? 

SelfIdentity
Excursionist
15 0 4

hi would anyone be able to help, the mobile version on my product page constantly freezes when a new variant is selected. 

a losing icon just stays on my screen here a link https://www.selfidentity.co.uk/products/closure?variant=22776704991290

thank you 

Noels
Visitor
2 0 0

Prabhat, 

That solution worked for me! Thank you!

Would you be able to tell me what that code is for? I don't want to block it if there is a purpose I don't know about.

 

Cheers,

Noel

TP_Marketing
Visitor
1 0 0

Hi, we are experiencing the same issue, but the theme that were using dosent have the app.js file. I did a "Find" with a snippet of the code you provided and have yet to find the correct file. Any Help would be greatly appreciated! 

 

Website: TwistedPro.us

Prabhat
Shopify Expert
83 8 28

Hi TP_Marketing,

I don't see the issue on your website anymore. It seems like you have figure out the issue. 

If you still have issue you can respond to this thread.

Solution Expert
- Did I solved your issue? Like & Mark As Solution to help the community
ZeninTCG
New Member
4 0 0

Hey,
My site is www.zenintcg.com
When you access the site on IOS mobile and after adding to cart, the site freezes. On Android and desktop it works fine but IOS mobile is not working.

Does anyone know of a fix for this?

Thank you