[Support request] Off-Canvas Panel closes after click in a menu item

Home Forums Support [Support request] Off-Canvas Panel closes after click in a menu item

Home Forums Support Off-Canvas Panel closes after click in a menu item

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #1583413
    jose

    When I click in a menu item inside off-canvas,
    Off canvas just close the menu so fast and after load the new url.
    How can i stop closing ooff canvas menu til url changes?

    #1584705
    Tom
    Lead Developer
    Lead Developer

    Hi there,

    It does this to allow for anchors on the page.

    However, you can tell it not to with some javascript.

    var slideoutLinks = document.querySelectorAll( '.slideout-navigation ul a' );
    
    for ( var i = 0; i < slideoutLinks.length; i++ ) {
    	slideoutLinks[ i ].removeEventListener( 'click', 'closeOffsideOnAction', false );
    };

    Let me know if you need more info 🙂

Viewing 2 posts - 1 through 2 (of 2 total)
  • You must be logged in to reply to this topic.