Position in Form retained from previous Form

What I’m trying to do:
(For example purposes).
I have three forms in my app. A Main and two others: Form1 and Form2
Form1 and Form2 have several pages of info on each.
If scroll down to the bottom of Form1, and then click on a link to bring me to Form2 - I am positioned at the bottom of Form2.
I would expect that to be at the top of Form2.
Is that expected behaviour for Anvil apps? or have I broken something in my app?

What I’ve tried and what’s not working:

Code Sample:

# this is a formatted code snippet.
# paste your code between ``` 

Clone link:
share a copy of your app

I’m not surprised to see that in any single-page web app, Anvil or otherwise. It’s not like we’re loading a new page from a new URL. We’re re-writing the content of the current web page, in browser memory.

Related to:

Ok. So I put some element at the top of the page and scroll that into view (in form_show)?

Yup! That’s the idea.

1 Like