Return to top page when changing page

Hello Weweb Community !

I’m looking for a bit of advice to load page at the top when a Change Page action is triggered. On the editor it works just fine, the page load at the top. In production it loads at the exact same place.

Do you have an idea on how to set it to the top ? Maybe with a little Javascript or using a default behaviour that I unconsciously activated ?

Here is a video of the behaviour in production : click

Thank you !

Your app is looking great!

I can help… I just need a couple of nights in one of the villas :wink: Joking.

That is a strange behavior that i have not seen before.

I would first do a test, on the live page, inspect the page and then refresh the page and page cache (you can do this when the inspector is open, left click on the browser refresh button and hold until you see the options dropdown, then refresh and clear all cache)

You could also look at adding some JS like:

window.onbeforeunload = function () {
  window.scrollTo(0, 0);
}

But really, the new page should load at the top.

If needed you can add the window.scrollTo(0,0) on a page load workflow, but thats not ideal.
Its indeed strange that you have this behavior, as the default router one is to always go back on top.

  • Go you explain more what is your route structure?
  • How is the link set? Are you using section link?

Hello @aurelie !

The issue we’re encountering is quite straightforward: when a user clicks the “Request to Book” button on a villa’s page during the booking process, the workflow successfully redirects them to the inquiry page as intended. However, upon landing on the inquiry page, the page position mirrors that of the previous villa page, instead of loading from the top as expected.

This problem is not isolated; it occurs across the site with any workflow that employs the “navigate to” trigger.

Interestingly, when we use the link option available in the second right panel, this issue does not occur.

Best,

:link: www.privatevillasmexico.com