Mobile Menu Mayhem? Fixing Chat Widget Overlaps in Shopify's Dawn Theme

Hey there, fellow store owners! Let's talk about something that's probably given more than a few of you a headache: those pesky chat widgets and review badges that decide to play hide-and-seek with your mobile menus and filter options. We've all been there, right? You're browsing your own site on your phone, you open the navigation menu or try to filter a collection, and BAM! A chat bubble or a Google review widget is sitting right on top, blocking that crucial 'Apply' button or parts of your menu. Frustrating, to say the least!

This is a super common issue, especially with modern Shopify themes like Dawn, and it came up recently in a really helpful community discussion. A store owner, @kub, kicked off the thread with a clear problem: their Shopify Inbox chat and Google reviews widget were overlapping the sidebar menu and collection filter dialogs on mobile, making it tough for customers to use the 'Apply' button. It's a small detail, but it can seriously impact the mobile shopping experience, and we all know how vital mobile is these days!

Understanding the Overlap Problem

So, what's actually happening here? Most chat widgets, review badges, and other floating elements are designed to stay visible no matter where a user scrolls. They typically achieve this by having a very high z-index value in their CSS, which essentially tells the browser, "Hey, put me on top of everything else!" While great for visibility, this can backfire when other important UI elements, like your mobile navigation or product filters, also need to be on top.

On mobile, screen real estate is precious. When your customers open a menu or a filter panel, they need to see that clearly. If a chat bubble is obscuring the 'Apply' button on your product filters, your customers might get stuck, frustrated, and simply leave. That's lost sales, and nobody wants that!

The Community's Smart Solution: CSS to the Rescue!

Thankfully, the Shopify community is full of clever folks, and a solid CSS solution emerged from the discussion. @kub, with a little refinement and confirmation from others like @devcoders, shared a powerful piece of code that tackles this head-on. The core idea is twofold:

  1. Elevate Your Menus: Give your mobile menus and filter panels an even higher z-index than the widgets.
  2. Temporarily Hide Widgets: Make the widgets disappear completely when the menus or filters are open, then reappear when they close.

This approach ensures that when your customers are interacting with crucial navigation or filtering options, those floating widgets politely step aside.

Here's the Code You'll Need:

This CSS snippet targets specific elements within the Dawn theme and common widget IDs. You'll want to paste this into your theme's custom CSS section.

@media(max-width:989px){
  .mobile-facets,
  body:has(#Details-menu-drawer-container[open]) .section-header{
    z-index:2147483647!important
  }

  body:has(:is(
    .mobile-facets__disclosure.menu-opening,
    #Details-menu-drawer-container[open]
  )) :is(
    #shopify-chat,
    #dummy-chat-button-iframe,
    iframe#ShopifyChat,
    merchant-widget,
    google-merchant-widget,
    #google_customer_reviews_badge,
    [id^="___ratingbadge"],
    iframe[src*="merchantwidget"],
    iframe[src*="shopping/merchant"],
    iframe[title*="Google" i][title*="store" i],
    [id*="merchant" i][id*="widget" i],
    [class*="merchant" i][class*="widget" i]
  ){
    display:none!important
  }
}

How to Implement This Fix in Your Dawn Theme

Don't worry, even if you're not a coding wizard, applying this CSS is pretty straightforward. Just follow these steps:

  1. Log in to your Shopify admin.
  2. Navigate to Online Store > Themes.
  3. Find your Dawn theme (or whichever theme you're using, though this code is specifically for Dawn) and click the "Customize" button.
  4. In the theme editor, look for the "Theme settings" icon in the bottom left (it usually looks like a gear or cog). Click it.
  5. From the Theme settings menu, select "Custom CSS" (or sometimes it's under "Advanced CSS").
  6. Paste the entire code block provided above into the Custom CSS field.
  7. Click "Save" in the top right corner.
  8. Test it out! Clear your browser cache and check your store on a mobile device. Open your main menu and navigate to a collection page to open the filter menu. Those widgets should now disappear when the menus are open and reappear when they close.

A Few Important Considerations

While this solution is incredibly effective, @Steve_TopNewYork from the thread brought up a couple of excellent points worth remembering:

  • Browser Support for :has(): The CSS relies on the :has() pseudo-class. Most modern browsers support it now, which is great! However, customers using older or less updated browsers might not see the same behavior. This is becoming less of an issue as browser updates are frequent, but it's something to keep in mind.
  • Third-Party Widget Settings: If you've applied the CSS and are still seeing an issue, it's worth checking the settings of your specific chat or review app. Some third-party widgets might inject elements with extremely high z-index values or have their own positioning settings that could override this CSS. In such cases, there might be an option within the app's settings to adjust its mobile behavior.

This kind of collaborative problem-solving is what makes the Shopify community so powerful. It's fantastic when store owners share their findings and help each other out with these common stumbling blocks. A huge shout-out to @kub and everyone else who contributed to this discussion!

Getting your mobile experience just right is crucial for conversions, and fixing these small UI annoyances can make a big difference. So go ahead, give this CSS a try, and make your Dawn theme even more customer-friendly on the go. Happy selling!

Share:

Use cases

Explore use cases

Agencies, store owners, enterprise — find the migration path that fits.

Explore use cases