Forum Academy Marketplace Showcase Pricing Features

Stop Page From Scrolling Keep Position

I want to stop the page from scrolling (I can do this) but I want to have it stay in the same position.

Currently everything I can find online does not work in Bubble. What I mean is that everything I find online that shows how to set the proper CSS or Javascript to keep the page from scrolling while maintaining the current page scroll position do not work in Bubble because for some reason, every method I try in Bubble makes it so when the page is set to not be scrollable, the page scrolls to the top.

I’ve tried with CSS and Javascript.

Has anybody been able to get a page to disable scroll while maintaining its current scroll position so that when the scroll is re-enabled, the page is in the same scroll position?

Hi!

This works for me!

Freeze and save scroll

1 Like

Thanks for sharing that link. From the demo seems a much better approach than what I have at the moment as the page doesn’t scroll to the top, which is what my current approach does.

1 Like

Does this work on mobile devices for you? When I use it on mobile I am still able to scroll when the popup is open. It works on desktop though.

Found this on the other thread you linked to…this works on mobile

1 Like

It works for me on mobile. I tested on an android and chrome. Mobile was my actual use case.

Did it not work for you initially?

No it doesn’t work for me on iOS. Page can still be scrolled. The link I provided has a tweak the poster commented was needed to have same effect work on mobile, and that approach works for me on iOS devices.

Thanks for the heads up!