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:
The code by @Markit-Themes would work, but I’d rather use Customize:Theme Settings=> “Custom CSS” instead of editing theme code – this will help when it’s time to update your theme to a new version.
Automatic update does not carry code edits over to new theme, but it does transfer theme settings.
That code makes cart drawer open on top of chat widget so that it does not obscure cart contents.
Another option is to hide chat widget completely when card drawer is open:
body:has(cart-drawer[open…
or
I’ve posted relevant solution earlier , but the code was lost due to forum migration.
So, reposting:
Here is what you can do without any theme code edits.
Add a new link to your menu, call it Chat and make it point to #chat (address is important).
Then add a “Custom liquid” section into your Footer section group and paste this code:
<script>
document.addEventListener('click', e=> {
let target = e.target.closest('[href$="#chat"]');
if (target) {
e.stopImmediatePropagation();
e.pre…