Viewing 4 replies - 1 through 4 (of 4 total)
  • Plugin Author joesexton00

    (@joesexton00)

    I’m not sure what the exact cause of this is, but I am guessing it is a conflict with the theme styling that is causing an issue. The plugin scrolls to the top of the body element, but it is possible that the theme has some margin or padding on the body or html elements of the page, which could prevent scrolling to the top of the page visually. I’d be happy to take a look at the site to see if I can debug the issue, if a solution can be found I’d like to implement it to help others as well.

    Thread Starter Jason Wong

    (@eljkmw)

    G’day Joe,

    Thanks for replying. May I know where in your plugin code executes the action of returning the webpage to the top, please? I can take a look at it and overwrite the theme’s margin or padding settings.

    Looking forward to hearing from you soon.

    Cheers,
    Jason

    I have the same problem that it doesn’t scroll all the way to the top. Only where the blog begins. https://www.lovesweetmess.com/

    If you can help me? or tell me what file to edit in the plugin.

    Thanks

    Plugin Author joesexton00

    (@joesexton00)

    In looking at https://www.lovesweetmess.com/ I see that the top of the <body> element evaluates to below the nav menu and hero image, which is why the plugin is not scrolling to the top of the page. Without modifying the theme the solution is to hack the plugin to change the selector used in the javascript file to go to the top of the nav menu header or to the <html> element. That can be found in /scroll-back-to-top/assets/js/scroll-back-to-top.js line 9.

    To address this I will add a filter for this selector so it can be modified by the theme if the <body> selector is not working correctly. Look for this filter in the next release.

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Doesn't scroll to the top edge’ is closed to new replies.