Skip to content

Minicart hide when confirm popup arrives

I have a minicart that opens when hovered over using the code below (minicart.phtml):

“triggerEvent”: “mouseenter”,
“closeOnMouseLeave”: true,

I want the minicart to close when the cursor moves away from it, and that works nicely. But I have a problem namely when I click to delete a product, and a popup appears asking if I am sure, the minicart immediately disappears. Probably the script detects that we are on overlay, so it hides the minicart. Anyone know how this can be fixed?