• Resolved JenWebDev

    (@jenwebdev)


    Hello, I’ve used this plugin numerous times without a hitch. I just started a new build, and it was working then suddenly stopped. It won’t scroll to the different sections, just returning to the top.

    The links are all correct, and the settings and template are identical to a working site. Not getting any error in the browser developer console. Not sure what the issue is. Thanks.

    The page I need help with: [log in to see the link]

Viewing 8 replies - 1 through 8 (of 8 total)
  • Thread Starter JenWebDev

    (@jenwebdev)

    Additionally, it’s not highlighting the different menu items as I scroll manually to different sections, and it’s adding the hash to the url even though it is set not to. Something is buggy. I’m using a twentytwenty child theme. Not sure if that makes a difference. There are no plugin conflicts.

    Thread Starter JenWebDev

    (@jenwebdev)

    Update: This is now a bug report.

    The plugin works perfectly with twentysixteen-child, but with the identical settings and template on a twentytwenty-child theme, it:
    – adds the hash when set not to
    – won’t navigate to an a-tag anchor at all
    – when set to scroll to a div id, the scrolling isn’t smooth. It jitters on Safari and jumps on Chrome, regardless of animation setting.

    I’m reverting to twentysixteen-child for this project now, because I have a tight deadline and need to get the site functional. I hope that this will get resolved, so we can use the plugin with modern themes.

    Thank you.

    • This reply was modified 5 years ago by JenWebDev.
    Plugin Author malihu

    (@malihu)

    @jenwebdev Hello and thanks for the feedback!

    I’ll try to explain what happens and provide a working solution.

    The issue with twentytwenty theme is that it has its own function for scrolling the page when links like #some-id are clicked.

    This function prevents all other scripts (like the ones in “Page scroll to id”) from scrolling the page and doing what they suppose to do.

    There’s no theme option to disable this functionality and the function itself is written in a way that cannot be disabled by other scripts (it’s an anonymous function).

    This issue is not something that can (or should) be resolved by “Page scroll to id”. The plugin already has an option to disable other scripts (“Prevent other scripts from handling plugin’s links” option), but the function in twentytwenty theme cannot be disabled in this way.

    The solution is to add an extra js script in your child-theme. Edit your child-theme’s footer.php and add the following script in a new line, right before the closing body tag (</body>):

    <script>
      twentytwenty.smoothScroll = null;
    </script>

    This should remove twentytwenty theme scrolling function, so you can use “Page scroll to id” properly.

    Please test this if you can and let me know if/how it works ??

    Thread Starter JenWebDev

    (@jenwebdev)

    Fantastic. Thanks so much. That worked perfectly.

    Plugin Author malihu

    (@malihu)

    Great. I’m marking this as resolved. If you need more help let me know.

    gna

    (@gna)

    To help others find the solution for this issue, could you update the title of the topic to “Scrolling not working with TwentyTwenty”?

    I cannot tell why the search did not return this topic, while I was searching for twentytwenty.

    Thread Starter JenWebDev

    (@jenwebdev)

    Unfortunately it won’t let me change it. Perhaps the plugin author can.

    Plugin Author malihu

    (@malihu)

    @gna @jenwebdev I can’t change a topic’s title. I think it’s better to create a new topic with the title you suggested and make it sticky (to appear at the top of the support forum)

Viewing 8 replies - 1 through 8 (of 8 total)
  • The topic ‘Scrolling not working’ is closed to new replies.