[Resolved] Off Canvas Panel disappears before new page loads

Home Forums Support [Resolved] Off Canvas Panel disappears before new page loads

Home Forums Support Off Canvas Panel disappears before new page loads

Viewing 10 posts - 1 through 10 (of 10 total)
  • Author
    Posts
  • #1387999
    Jakub

    Hi,

    I am using the off canvas menu for mobile on my site. When I click on of the menu items the Off Canvas Panel disappears, the current page is displayed and then the new page loads. I think it would look nicer without the brief jump back to the current page. Is there a way to keep the Off Canvas Panel displayed until the new page is shown?

    #1388057
    David
    Staff
    Customer Support

    Hi there,

    which device are you seeing this on? Or any particular link ?
    Its behaving normally on my iphone which is to navigate to the new page before closing.

    #1388108
    Jakub

    It works fine on Safari (both desktop and ios).
    I see the error on desktop Chrome and Firefox as well as mobile Chrome and Samsung Internet App.

    #1388416
    Tom
    Lead Developer
    Lead Developer

    Hi there,

    This functionality is intended. However, you may be able to disable it with some custom javascript: https://gist.github.com/generatepress/35c505f1aac124edf071f9008061ee6d

    If you don’t have a javascript file to edit, you can use the wp_footer hook in a Hook Element. Just be sure to wrap the code in <script> tags:

    <script>
        // The JS in here
    </script>
    #1388527
    Jakub

    Hi Tom,

    I’ve added the code you gave into the wp_footer via hook element, but the functionality doesn’t seem to have changed.

    #1388671
    Tom
    Lead Developer
    Lead Developer

    Can you try giving the Hook Element a high priority? Something like 1000.

    Let me know ๐Ÿ™‚

    #1388794
    Jakub

    I’ve set the priority to 1000, but I think nothing changed.

    #1389690
    Tom
    Lead Developer
    Lead Developer
    #1390350
    Jakub

    It works now. Thank you Tom!

    #1391658
    Tom
    Lead Developer
    Lead Developer

    You’re welcome! ๐Ÿ™‚

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