Skip to main content

Overview

If your store page becomes unscrollable after closing Upcart, it is likely caused by your theme’s logic that locks the page scroll when a cart drawer is open. Additionally, Upcart now provides built-in settings to address these issues, such as overriding existing scroll locking logic. You can fix this by using built-in settings within Upcart or by adding a small customization to remove the scroll lock behavior.
How to Fix It

Using Built-In Solutions

For most cases, built-in options in Upcart settings can resolve scrolling issues without requiring custom code.
  1. Enable “Override existing scroll locking logic”:
    • Open the Cart Editor in your Upcart settings.
    • Go to SettingsCart settings, then expand Advanced Settings.
    • Enable Override existing scroll locking logic. Its description covers exactly this case: a theme or third-party app leaving the page scroll-locked after the cart closes.
    There is no separate mobile or overlay scroll setting — this one checkbox covers both.
Follow these steps to apply a customization that restores page scrolling after the cart closes.

Accessing Custom HTML Settings

  1. Open the Upcart App from your Shopify dashboard.
  2. Navigate to the Cart Editor.
  3. Open Settings and select the Custom HTML tab. Settings is a row of tabs — if you don’t see Custom HTML, it’s behind More settings.

Adding the Code

  1. For advanced or specific cases where built-in solutions do not resolve the issue, you can apply custom HTML code in Upcart. Choose where to apply the HTML code in Upcart. For this fix, select the section Above Announcements/Rewards.
  2. Add the following code snippet:
Legacy note: window.upcartOnCartOpened and window.upcartOnCartClosed callbacks still work but are deprecated and log console warnings. Use upcartSubscribeCartOpened and upcartSubscribeCartClosed for all new scripts.
  1. Save your changes.
  2. Refresh your storefront and test closing the cart to confirm scrolling is restored.

Why This Happens

When Upcart opens, it hides your store’s native cart drawer and takes over its visual space. However, some themes include code that locks page scrolling whenever a drawer is active. After Upcart closes, that lock may remain in place, preventing the page from scrolling. On mobile devices, additional issues such as overlays persisting or causing the page to become unclickable can occur. These problems are often tied to mobile-specific scroll locking behaviors or unreset overlays. The script above restores normal scroll behavior by manually resetting the page’s overflow property when the cart is opened or closed.
Need Help or Further Troubleshooting

Additional Steps Before Contacting Support

  1. Ensure Override existing scroll locking logic is enabled.
  2. Double-check if custom code or third-party scripts might interfere.
If you are still experiencing scrolling issues after applying the fix, your theme may use a different selector or custom scroll logic. Contact Upcart Support for assistance identifying the correct selector, or reach out to your theme developer for help adjusting your theme’s scroll settings.