Disable scroll jumps to the top of the page when triggered

Hello Community,

I’m having an issue when the disable scroll is set to toggle, it jumps to the top of the page in safari, but only on actual tablet/mobile devices, not while checking the breakpoints from the desktop app.

can someone replicate the issue and let me know what I should do to prevent this? I don’t have an anchor link added to the hamburger menu or anything.

here are the sites where it’s happening:

thanks a lot!

Hey @de.skaaa!

The scroll jumping issue you’re experiencing on Safari mobile/tablet is a known webkit behavior. When the disable scroll attribute applies position: fixed to lock body scrolling, Safari resets the viewport to the top instead of maintaining your scroll position.

We have two potential solutions for you:

Option 1: Custom CSS Override (Recommended)
Add custom CSS to preserve the scroll position, paired with JavaScript to manage when scrolling is disabled and re-enabled. This approach works with Finsweet’s existing implementation while preventing the jumping behavior.

Option 2: iOS-Specific Height Method
An alternative that uses a different approach for iOS 15+ devices using height and overflow properties instead of fixed positioning.

We recommend the first option as it maintains compatibility across iOS versions without interfering with existing functionality.

If you’d like to implement either solution, @Support-Luis or @Support-Pedro can help you with the specific code implementation and testing. They can also assist if you’re still experiencing issues after trying these solutions.

Would you like us to have one of our developers help you implement this fix?

Thanks a lot @Support-Finn. Yeah, I’d be very happy if one of you guys could offer a precise solution. Many many thanks.

Hey @de.skaaa! Couold you share a read-only link? I’ll try my best to figure out a solution

Hey @Support-Luis , [here it is], sorry for forgetting to include it in my original post.

Do you think that you can make a universal solution for this? I’m using this nav in every project of mine and it’d be great to have the issue fixed.

Also, all this hassle makes me wonder whether this F’insweet solution is fully functional at all. I mean, if the default setup causes this glitch in safari on mobile devices automatically, I assume many others face the same issue. I hope you can rectify it sometime in the future.

Nevertheless, thanks a lot for your input and the hard work!