I have used default Magento 2 mini cart dropdown and my account dropdown it's working fine. But I'm facing the issue if we click my account tab mini cart dropdown still open I want to hide when we click my account tab.

1 Answer 1


Add below script in app/design/frontend/VENDOR/THEMENAME/Magento_Customer/templates/account/customer.phtml. this will solve your issue

<script type="text/javascript">
    requirejs(['jquery'], function($)
        $('div.block.block-minicart').on('dropdowndialogopen',function () 
            $('.customer-menu').attr('aria-hidden', 'true');

        $(document).on('click.hideDropdown', function (e) 
  • 1
    this solution creating an issue, when we have item in mini cart, and we trying to update item quantity or clicking anywhere inside minicart box instead of links then minicart box closing automatically and it's not allow to update the item quantity. please help me out to resolve this issue Commented Jul 8, 2020 at 9:34

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.