[Support request] problem with the off canvas menu does not close automatically

Home Forums Support [Support request] problem with the off canvas menu does not close automatically

Home Forums Support problem with the off canvas menu does not close automatically

Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • #2203501
    André

    off canvas menu does not close when I select a widget button (contact us button highlighted) anchored to the page. The off canvas menu remains open. How can I solve? Thanks in advance

    #2203504
    Fernando
    Customer Support

    Hi Andre,

    I tried replicating the issue from my end and I can’t seem to replicate it.

    See: https://share.getcloudapp.com/xQuq5b6w

    I also tested on real phone and the close button still worked as expected.

    Are there certain steps I missed to replicate the issue?

    Moreover, if you test the occurrence of this issue on a different device, does the issue also exists? If it doesn’t, perhaps this could be a browser or device caching issue.

    Kindly let us know. 🙂

    #2203588
    André

    yes, the problem is when I click the widget button at the bottom of the off canvas menu. The off canvas does not close

    #2203593
    André

    I inserted the anchor in the “CONTACT US” button but the off canvas menu does not close when clicked, I would like to know if there is a solution to this

    #2203615
    Fernando
    Customer Support

    I see. That’s the default behavior, and you’ll need custom code to achieve as such.

    You can try creating a Hook Element hooked to wp_footer and displayed to the Entire site with this code:

    <script>
    var myanchor = document.querySelectorAll( '.slideout-navigation .my-anchor-button' );
    
    	var YourOffsideCloseAction = function() {
    	var url = this.getAttribute( 'href' );
    
    	if ( '#' !== url && '' !== url && ! navigator.userAgent.match( /iemobile/i ) ) {
    		setTimeout( function() {
    			generateOffside.close();
    		}, 200 );
    	}
    };
    	
    for ( var i = 0; i < myanchor.length; i++ ) {
    	myanchor.addEventListener( 'click', YourOffsideCloseAction, false );
    };
    
    </script>

    Hope this helps! 🙂

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