Scroll-padding not working

Hi there, I have a site with a sticky header and some anchor links to sections. The problem is that the sections are being cut-off by the header. I’m trying to add a scroll-padding-top but can’t make it work.
Can you help?

This is the URL https://jorges99.sg-host.com/ (click on the Learn More inside the hero section)

Can you grant us access to this site in a secure note? This has come up before, but I’ve never been able to recreate. Being able to see it happen locally we can get to the bottom of this. I would guess it’s the fact the first bar is height of 8px is messing with the scrolling logic, however that never affected my scrolling when doing a similar setup.

Here you have

Hi @mcostales84,

It might be related to an ongoing problem with the Sticky Bar and the offset calculation. I would suggest you go through the following thread which might help you.


Thanks

I have tried all of those solutions and didn’t work at all.
Also, the code you’re sharing is a patch, from years ago, that problem should have been fixed already.

Hi @mcostales84,

It has been already fixed, but somehow it reverted. I have already informed our developers about this and they are looking into it.

Thanks

Something that changed early on is this line in the change log for V6.0.0. In short those filters are now all fixed_top_offset. On our end I’m going to add the other filters to filter this new one for support for pre pro 6 sites. I do think we really need to fix the scroll height issue, however I was not able to grab a copy of your site post issue fix. Do you by chance have a copy of the site pre fix? It’s unfortunate I can’t recreate even with copying your basic structure. I’m guessing something else on the page triggers this issue. Thanks glad it’s working better on your end now and we’ll definitely be tightening down the frontend libraries for Pro 6.

  • Updated: Remove hash_scrolling_offset and scrollspy_offset JS hooks and implement single fixed_top_offset hook

@charlie you still have access to my site, the solution I found on Facebook, pointed by Josh Donnely, was this code added to the JS on the homepage (where I have that problem)

jQuery(document).ready(function ($){
$('a[href*="#"]').off( "click touchstart");
$('a[href*="#"]').on('touchend click', function(e) {
href = $(this).attr('href');
notComments = href.indexOf('#comments') === -1;
if ( href !== '#' && notComments ) {
var theId = href.split('#').pop();
var $el = $('#' + theId);
if ( $el.length > 0 ) {
e.preventDefault();
$('html, body').animate({
scrollTop: $($el).offset().top -120
}, 450);
return false;
}
}
});
});
1 Like

if you remove that, the problem comes back

1 Like

Thanks a bunch for the notes. I’ll keep you posted on the fix.

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.