Hi everyone — I’m using a custom Shopify theme and running into a persistent bug:
On mobile, when a user selects a size on a product page → navigates to another page → then returns to the product, the size swatches disappear or show incorrectly. It works fine on desktop.
I’ve already described the issue here on GitHub with screenshots and repo access:
Variant swatch bug on mobile – size options disappear when navigating back · Issue #1 · areyouadoor88/areyouadoor88 · GitHub
I’m not a developer, so I’d love help from anyone who’s familiar with JavaScript swatch rendering or Shopify variant logic.
Thanks in advance 
Please send your store url for a visual understanding.
Hey @yourfind.co,
Could you please share your store URL and password [if applicable] so that I can take a look and provide you solution code.
Looking forward to hearing back from you.
Thanks
Hi @Shadab_dev and @The_ScriptFlow
Thanks for offering to help! Here’s my store preview link:
https://ozjvzdg3q0upz12l-68081516700.shopifypreview.com
Password: 123456789
Just to give you a bit more background, I’ve been testing this issue in a few different ways:
-
When I use my laptop browser and switch to mobile mode (using the developer tools), the size options display fine and everything seems to work.
-
But on an actual mobile device, the problem appears: sometimes the size swatches don’t show up at all, or they show up blank/misaligned.
-
If I navigate between pages a few times and then go back to the product, it’s kind of random, sometimes the sizes show, sometimes they don’t.
It’s driving me a bit crazy, honestly, since it feels like a caching or JavaScript thing that only happens on real mobile, not in the browser’s mobile simulation.
Would appreciate any insights or if you need me to share anything else, let me know. Thank you both for your time!
Since this happens only in actual mobile devices and that too randomly it’s pretty hard to actually see the error, even if we the see the error then how do we inspect this
.
Tried a few times navigating across pages but don’t see the error, also doesn’t feel like a code big or else it would be on desktop as well.
Best
Hi @yourfind.co,
I tried it on my devices and all show up fine.
Can you send me a screenshot of the error or try on another device?
Thanks a lot for checking, Shadab! If you happen to think of any fix or workaround, please let me know.
Thanks for checking, Namphan!
Please find the screenshot below, I got this after going into a product page, then navigating to other pages, and coming back again. The sizes turn blank and get all mixed up, like some sizes move into the wrong boxes.
Have you tried going in and out of product pages multiple times? On my side, it sometimes works fine, but most of the time this happens on mobile.