Solving the Horizon Theme Quick Add Button Glitch: A Community-Sourced Fix
Hey there, fellow store owners! Let's chat about a common frustration that recently popped up in the Shopify community forums, and how a brilliant solution emerged. We’re talking about those pesky Quick Add buttons on the Horizon theme, specifically on your homepage, that seem to have a mind of their own sometimes.
Our friend Asa, from 3rdDay, kicked off a thread because their Quick Add buttons on the homepage were, well, glitching. You know the drill: you go to click 'Quick Add' to see product options, and instead of opening, it just… doesn't. Or it closes immediately. Asa even shared a screen recording, and it's a super common scenario where a slight mouse movement during the click seems to throw things off. Interestingly, Asa noted it didn't happen as much, if at all, on collection pages – a key detail!
Understanding the Quick Add Glitch
When something like this happens, it's often a sign of a JavaScript conflict or an event listener getting a bit overzealous. Shopifyexpert1.0 from the community weighed in, suggesting that since the Quick Add functions better on collection pages, the issue was likely tied to a JavaScript conflict or something specific to the homepage product section. Their advice was spot on for general troubleshooting: check for conflicts with recently installed apps or custom theme codes. A great first step is always to duplicate your theme and test on an unmodified copy to isolate the cause. That's solid advice for any theme tweak, really.
The Community's Elegant Fix for Horizon Theme
But then, a hero emerged! Ploqo came through with a precise, elegant solution that directly addresses the Horizon theme's behavior. It’s a small script that you can add right into your theme, and Asa confirmed it was “really helpful code!” This is why I love our community – real problems, real solutions.
The core of the problem, as Ploqo's solution implies, is that sometimes the 'mousedown' event (when you press the mouse button) on the Quick Add button might be triggering other actions, especially if the button is within a dynamic section like a product carousel. A tiny bit of mouse drift can cause the theme to interpret it as a drag or a click on the parent element, rather than just the button itself. Ploqo's script effectively tells the browser, "Hey, if someone clicks *this specific Quick Add button*, don't let that click ripple up and activate anything else." This is done using event.stopPropagation().
Step-by-Step: Implementing the Quick Add Button Fix
Ready to get your Quick Add buttons behaving? Here’s how you can implement Ploqo’s fix:
- Access Your Theme Editor: From your Shopify admin, go to Online Store > Themes.
- Edit Your Horizon Theme: Find your Horizon theme and click on the '...' (three dots) button, then select Edit code. (Ploqo's image shows 'Edit theme', which takes you to the customizer, which is also correct for this method).
- Navigate to the Homepage Template: In the theme customizer, make sure you're viewing the Home page. Under Template, scroll down and click Add section.
- Add a Custom Liquid Section: In the search bar for sections, type
customand select Custom Liquid. - Paste the Code: In the Liquid code field that appears, paste the following JavaScript snippet exactly as it is:
- Save Your Changes: Hit Save at the top right of the editor.
After saving, refresh your homepage. You should find that your 'Choose' (Quick Add) buttons now open the quick add window reliably with every click, even if your mouse moves a tiny bit. Success!
A Note on Custom Code and Theme Updates
While this fix is fantastic, remember that adding custom code means you'll want to keep an eye on it, especially after major theme updates. Sometimes, theme updates might change the underlying structure or JavaScript, which could potentially affect custom snippets. However, for a simple event handler like this, it's usually quite robust.
It’s always a good idea to periodically review your theme's performance and functionality. If you ever find yourself struggling with a similar issue on another theme or a different part of your store, Shopifyexpert1.0's advice about checking for app conflicts and testing on a duplicate theme is a solid general strategy. The power of the Shopify ecosystem often lies in its flexibility, but with great flexibility comes the need for a little careful management!
This whole thread is a perfect example of how the Shopify community thrives on shared experiences and collective problem-solving. It's awesome to see store owners helping each other out with these kinds of practical solutions. Happy selling!




