"Go to page..." doesn't take you back to the top of the page

Working on a UI where users can browse different artwork by the same artist.

Example.

The problem is that this is near the bottom of the page. When they pick an artwork and I do a “Go to page…” it reloads all the data on the page but the user doesn’t see anything happen because the changes happen way up at the top of the page.

I had previously solved this by scrolling to the top, animating the page flashing out and in, but it just feels janky. Want a nice clean way to just instantly be at the top of the page.

1 Like

window.scrollTo(0,0);

1 Like

Does the scroll to action not work? :thinking:

I mentioned in my post that this is what I was doing before, but I’m not happy since it’s not instant.

Have you tried: window.scrollTo(0,0, {behavior: "instant"})

Are you saying window.scrollTo(0,0); is not instant?

Nope, I was responding to @ihsanzainal84 who mentioned the scroll to action, e.g. the Bubble action.

I was a web developer for over 20 years before working in Bubble, so I know better than most what is possible when leaving Bubble and doing things with Javascript. I just want to know what’s possible with Bubble. It is a “no code” platform after all.

Far too often I see people suggest a code solution too early, when it turns out that there’s a really great way to get it done with native Bubble.

1 Like

You could try hiding and then showing the elements at the bottom of the page (placing them in one group). And see if that brings you instantly and smoothly to the top of the page.

1 Like

This topic was automatically closed after 70 days. New replies are no longer allowed.