Goal: Hide the Shopify Inbox chat widget when the Motion theme’s cart drawer () is open.
Current approach: OP added a script (in theme.liquid, before ) that uses a MutationObserver to watch the cart-drawer’s open attribute and toggles chat elements’ display/visibility. Despite this, the chat still shows; OP suspects the widget may be inside an iframe.
Context provided: Theme = Motion by Archetype, Chat = Shopify Inbox (default), Cart type = drawer, Public URL not provided (placeholder only). Code snippets are central; they include minor typos (e.g., “docum ent” and “display: none” with a leading space) that could affect behavior.
Feedback:
Practical workaround: reposition the chat button to the opposite screen side so it doesn’t overlap the drawer.
Debugging requirement: share a publicly inspectable store URL to verify selectors, DOM structure, and loading timing.
Alternative fix: raise the cart drawer’s z-index and/or adjust the chat container’s z-index so the drawer overlays the chat regardless of state; related threads were linked for reference.
Status: Unresolved. Next steps: provide the live URL; test z-index overlay approach; verify iframe involvement and correct typos/selectors in the script.
Summarized with AI on December 11.
AI used: gpt-5.
Simplest solution if using a chat widget is to just position it on the other side of the screen.
@SidG the codes meaningless without the environment it’s running in.
OTHER people are not mind readers , we don’t all magically have your exact setup or see what you see. Provide publicly inspectable urls.
The info is right in front of you , communicate detail in advance.
Thanks for your reply! I understand that my initial post didn’t give enough context. Here’s more detail about my setup so it’s easier to reproduce:
Theme: Motion by Archetype
Chat widget: Shopify Inbox (default chat)
Cart type: Drawer (<cart-drawer>), not full page
Where the script is added:theme.liquid just before </head>
Issue: The chat still shows even when the cart drawer is open. I suspect it may be inside an iframe, or Motion’s drawer doesn’t trigger the script the way I expected.
I hope this makes it easier to see what’s going on. Any suggestions on how to properly hide Shopify Inbox when the cart drawer is open would be very helpful.
Sigh, think of how much time your wasting and steps your expecting others to jump through by doing everything BUT providing a url to see the frontend problem.
chatgpt can’t do all the work.
Technically, you should be able to set z-index on Shopify chat parent element and your cart drawer so that cart drawer opens on top of the chat, no matter what state it is.
Also – search first.
Literally – just my posts on the issue: