Home Forums WoodMart support forum Mobile off canvas menu doesn’t close upon click

Mobile off canvas menu doesn’t close upon click

Viewing 9 posts - 1 through 9 (of 9 total)
  • Author
    Posts
  • #372028

    gonails
    Participant

    Hi!

    I can’t make the mobile off-canvas menu work. When I click on a menu item that has an anchor to a section on that page, it does scroll to it, but it does not close itself (it used to do it). Also, if I upon a popup, it also doesn’t do it.

    I have deactivated all the plugins except woodmart core, elementor and woocommerce.

    Regards.

    #372034

    gonails
    Participant

    Also, in order to test this do the following:

    1) Visit staging.gonails.com.ar
    2) Click on the hamburger menu and click on LOCALES. This one will open the pop-up.
    3) Close the popup and try the next option, “RESERVAS” which has the menu anchor.

    #372142

    Hello,

    Please edit the menu item and try enabling the option of one page anchor.

    Screenshot for Clarification: https://gyazo.com/b4f36e1c3ac66c2bb179b552edb2741d

    Best Regards

    #372300

    gonails
    Participant

    Thanks!, that worked for the one page anchor.

    I still have the elementor pop-up problem. I have a selector .popup-locales on the elementor popup and on the menu no URL but the CSS class as popup-locales. This way the popup opens, but the off canvas menu doesn’t close itself.

    If I follow elementor’s tutorial (which I use for other non-woocommerce websites with the theme hello elementor), then the popup doesn’t even open (and the off canvas doesn’t close). This is the tutorial: https://elementor.com/help/how-to-trigger-a-popup-from-a-nav-menu-item/

    #372424

    Bogdan Donovan
    Keymaster

    Hi,

    In our theme, both anchor and plugin popups don’t close the mobile menu. In this case, try to create a separate menu for the mobile header without following menu types.

    As an alternative try to use the following custom code to place plugin popups over the theme mobile menu

    .elementor-popup-modal {
    	z-index: 99999 !important;
    }

    Kind Regards

    #372470

    gonails
    Participant

    Hi!

    I actually could close the mobile menu with the anchor per the previous reply from your team. So this can be done.

    There should be a way (js maybe?, I’m not that techy) to get this done. I for example use this code that I put in an HTML element in my popup menu in elementor to close it after a click:

    <script> jQuery( document ).ready(function($){ $(document).on('click','.elementor-location-popup a', function(event){ elementorProFrontend.modules.popup.closePopup( {}, event); }) });</script>

    Can this be tailored to Woodmart and put it somewhere?

    Either way, you should include this in your features, it’s a basic expected behavior. The theme is great though.

    #372752

    Artem Temos
    Keymaster

    Hello,

    Try to use the following code snippet to achieve this. Note that it contains the ID of the menu item 248 so you might need to replace it if you want to apply it for another menu item

    jQuery('#menu-item-248 > a').click(function(e){
        jQuery('.wd-close-side').trigger('click');
    });

    Kind Regards

    #372848

    gonails
    Participant

    Wonderful, it worked great, thanks!

    #372957

    Artem Temos
    Keymaster

    You are welcome! Feel free to contact us if you have any further questions.

    Kind Regards

Viewing 9 posts - 1 through 9 (of 9 total)

The topic ‘Mobile off canvas menu doesn’t close upon click’ is closed to new replies.