[Resolved] sticky navigation stops working (menu disappears) half way down page

Home Forums Support sticky navigation stops working (menu disappears) half way down page

Viewing 15 posts - 1 through 15 (of 22 total)
  • Author
    Posts
  • #937669
    david

    Hi, Have sticky navigation turned on.
    on this page I scroll half way down and sticky navigation menu disappears – on shorter (less content) pages it works ok.
    How can I fix this so it works on all page?

    Thanks for your help
    David

    #937753
    David
    Staff
    Customer Support

    Hi there,

    i am seeing a tonne of errors appearing on the console when scrolling, Right Click > Inspect the web page and look at the console tab.

    The script that is broken is being called from:
    // Content Template: loop-item-in-plant-common-names – start (?)

    #938193
    david

    Thanks for your reply.
    Clicking on inspect > console tab I don’t see any errors generated by this page only javascript errors from the home page.
    You say the broken script is from // Content Template: loop-item-in-plant-common-names – start (?).
    What is ” – start (?)”.
    Any possibility of sending a screenshot of the errors?

    Thanks
    David

    #938205
    Leo
    Staff
    Customer Support

    Here it is:
    https://www.screencast.com/t/G2OBC2wxF

    Might be easier to just disable all plugins except GP premium to find the culprit.

    Let me know if this helps 🙂

    #938304
    david

    Hi Leo,
    Thanks for your reply.
    I’m using Toolset plugins – disabling them totally messes up my pages.
    Are there any known conflicts with Toolset Types plugins?

    Thanks
    David

    #938511
    David
    Staff
    Customer Support

    No known conflicts with Toolset – as GP doesn’t know it exists and doesn’t impose any restrictions on custom post types. The conflict is due to the scrolling function that looks to be related to the tables being used that is creating the error and breaking the sticky nav.

    When you build the pages in Toolset was there any scroll function options like a scroll to top button ?

    #938783
    david

    Hi David, really struggling with this, appreciate your help.
    Tried Leo’s suggestion to disable plugins but that didn’t help.
    You say the problem is the “scrolling function that looks to be related to the tables”
    so I removed “overflow-y: scroll; ” from the css which is the only scrolling function
    I can see, but no difference – menu still disappearing.
    Can you be more specific on what’s causing the problem.

    Thank for your help
    David

    #938802
    David
    Staff
    Customer Support

    The Javascript errors look to be related to the fixed table headings. Can they be disabled so we can see if that is causing the problem.

    #938813
    david

    Tried removing the whole table, but menu still disappearing at the same point!
    The Toolset JS I have on this page:

    
    // jQuery('.inside-article:first').attr('id','plant-start') 
     window.onscroll = function() {scrollFunction()};
    function scrollFunction() {
        if (document.body.scrollTop > 250 || document.documentElement.scrollTop > 250) {
            document.getElementById("myBtn").style.display = "block";
        } else {
            document.getElementById("myBtn").style.display = "none";
        }
    }
    // When the user clicks on the button, scroll to the top of the document
    function topFunction() {
        document.body.scrollTop = 0; // For Safari
        document.documentElement.scrollTop = 0; // For Chrome, Firefox, IE and Opera
    }
    

    Tried removing it, but still have the same problem.

    #938818
    Leo
    Staff
    Customer Support

    It’s really tough to debug like this.

    You said that “Tried Leo’s suggestion to disable plugins but that didn’t help.”

    Did you disable all plugins including ToolSet?

    If so can you leave them off for us to have a look?

    Might need to duplicate the site on a staging environment if this is live site with traffic.

    #938849
    david

    Hi,
    Thanks for your help. I have another problem with my site which I’m trying to resolve.
    If I disable Toolset Layouts plugin, then only part of the page appears and with that part the sticky navigation works.
    So I should probably first sort out that problem so I can see the whole page without Layouts and then see if sticky nav still works.

    Toolset Layout plugin disabled

    Does this give an indication where the problem is?
    Could also look for another solution for a sticky nav? – any suggestions?

    Thanks for your help
    David

    #938861
    Leo
    Staff
    Customer Support

    What if you simply create a test page with lots of dummy text with Toolset Layout Plugin deactivated?

    Does the sticky navigation work?

    If so then it’s safe to say that the plugin is the issue.

    That case I would recommend reporting this to their support.

    Let me know 🙂

    #941884
    david

    Hi Leo,
    I contacted Toolset in connection with this problem, here’s their reply:

    Hi David

    I looked for a page where I could see the issue with the sticky nav and saw it on the plant names page (http://florapalaestina-ethnobotany.org/?page_id=8573).

    With my browser dev tools open I could see the issue, namely that the nav element has position:fixed, but at some point when scrolling the page it switches to position: absolute (which appears to be triggered by a file sticky.js).

    I edited the page, and I couldn’t see any content related to Toolset.

    So I disabled all of the Toolset plugins and reloaded the page—where I observed exactly the same behaviour.

    Meaning that this isn’t caused by Toolset. I don’t know enough about this Generate Press sticky nav, but I think you’ll need to go back to them.

    This video may help (it was recorded with Toolset de-activated): http://recordit.co/UhQY6SsDCC

    In it you can see how inline styles for position are being updated via JS depending on the scroll position.

    Debug is enabled on my site at the moment.

    Thanks for your help.

    David

    #941910
    David
    Staff
    Customer Support

    There has to be something other conflicting with the GP Sticky nav – i noticed a bunch of PHP errors being displayed on the Plant Names page above the table. Might be best to eliminate these issues first.

    #942182
    david

    Hi David, that doesn’t help me very much. Leo suggested I speak with Toolset – I’ve sent you their reply.
    I think Nigel from Toolset gave you something to check out – he doesn’t say anything about the PHP errors causing the problem.
    Appreciate your help
    David

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