Is Your Shopify Product Page Stuck? How Klaviyo Can Secretly Lock Your Scroll (and How to Fix It!)
Hey everyone! Ever landed on a product page, excited to scroll through all the details, only to find it… stuck? Like it’s frozen in time, refusing to budge on both desktop and mobile? If you've experienced this incredibly frustrating bug, you're definitely not alone. We recently saw an urgent plea in the Shopify Community from siva_fds, who was battling this exact issue on their store using the Reformation theme. They had a beautiful 'Cloudigan' product page that just wouldn't scroll, and it was causing a real headache.
The Mystery Behind the Frozen Scroll
It’s easy to point fingers at the theme when something goes wrong with page display, but as one of our sharp-eyed community experts, vestfoldhall, quickly discovered, the Reformation theme wasn't actually the culprit here. After a detailed investigation, watching the page load second by second, they pinpointed the real troublemaker: Klaviyo's onsite script.
Here’s the breakdown: around five to ten seconds after the page loads, a specific class, klaviyo-prevent-body-scrolling, was being added to the element. What does this class do? It sets the overflow property to hidden, which is essentially a digital padlock on your page's scrollbar. This is a common tactic for pop-up forms to ensure visitors focus on the form and can't scroll past it. The problem? In siva_fds's case, the Klaviyo sign-up form that should have appeared never did, leaving the scroll lock engaged indefinitely.
So, if your page is stuck, chances are an invisible Klaviyo form is holding it hostage.
Solution 1: The Best Approach – Taming Your Klaviyo Forms
The most robust and recommended fix, as vestfoldhall wisely suggested, is to go straight to the source: your Klaviyo account. This isn't just a band-aid; it's about making sure your forms behave exactly as you intend them to. Here’s how you can troubleshoot and resolve it:
- Log into Klaviyo: Head over to your Klaviyo dashboard.
- Navigate to Sign-up Forms: Find the 'Sign-up forms' section.
- Identify Potential Culprits: Look for any forms that are set to target product pages (or all pages) and are configured to display full screen or to actively lock scrolling. Pay close attention to their display settings and device targeting. Sometimes a form meant only for mobile might be misfiring on desktop, or vice-versa, causing the hidden lock.
- Test Systematically: This is key! If you have multiple forms, don't just unpublish them all at once.
- Unpublish one form at a time that you suspect might be causing the issue.
- After unpublishing, reload your product page in a private or incognito browser window. This ensures you’re seeing a fresh load without cached data.
- Check if the page now scrolls freely after the initial 10-second window.
- If it does, you've found your culprit! You can then adjust that specific form's settings in Klaviyo (e.g., its display rules, timing, or how it interacts with scrolling) or simply keep it unpublished if it's not essential.
- Republish other forms one at a time, repeating the test, until you isolate the problematic one.
- Adjust Form Settings: Once you’ve identified the problematic form, review its display rules. Ensure it's not set to lock scrolling without actually displaying the form itself. You might need to adjust its timing, triggers, or device targeting.
This method ensures Klaviyo functions as intended, only locking the scroll when a visible form is present, offering a much better user experience.
Solution 2: The Quick Patch – A CSS Override
While fixing the Klaviyo settings is the ideal long-term solution, sometimes you need a quick fix to get your pages scrolling again, especially if you're in a pinch or need time to properly configure your Klaviyo forms. Another community member, Mustafa_Ali, provided a helpful CSS snippet that can act as a temporary patch.
This code essentially tells your browser, 'Hey, even if Klaviyo tries to hide the scroll, let it be visible anyway!'
How to Apply the CSS Patch:
- Go to your Shopify Admin: From your dashboard, navigate to 'Online Store' and then 'Themes'.
- Edit Theme Code: Find your current theme, click the 'Actions' (three dots) button, and select 'Edit code'.
- Locate
theme.liquid: In the file editor, search fortheme.liquidin the 'Layout' directory and click on it. - Insert the Code: Scroll to the very bottom of the
theme.liquidfile. Just before the closingtag, paste the following code snippet:
This is what it looks like in the editor:
- Save Your Changes: Click 'Save' to apply the code.
A Word of Caution: As vestfoldhall pointed out, while this CSS patch stops the symptom, it also overrides Klaviyo's scroll lock entirely. This means if a real Klaviyo popup (like a sign-up form) is supposed to appear and intentionally lock the scroll, shoppers will still be able to scroll the page behind the form. This might not be the ideal user experience for your pop-ups, so it's best treated as a temporary measure while you sort out your Klaviyo form settings.
Final Thoughts for Your Shopify Store
Dealing with unexpected bugs can be a real drain on your time and energy, especially when they affect critical pages like your product listings. The key takeaway here is often, what seems like a theme issue might actually be an interaction with an app or an external script. Always start by checking your app configurations, especially those that inject code or manipulate page elements (like pop-ups, chat widgets, or analytics). A systematic approach, like the one outlined for Klaviyo forms, can save you a lot of guesswork.
If you're still thinking about starting your own Shopify store, or looking to migrate your existing business to a more robust platform, remember that the Shopify ecosystem offers a wealth of community support and powerful tools to help you navigate these kinds of challenges. You can explore more about starting your journey right here: Start your Shopify store today!
By understanding how different elements of your store work together, you can troubleshoot more effectively and ensure your customers have a smooth, frustration-free shopping experience. Keep those questions coming to the community – it's how we all learn and grow!