Forum Academy Marketplace Showcase Pricing Features

Scroll to top (one page app)

Hello,

I tried to find information in another posts here in forum and I wasn’t able to find right answer.

My main problem is when user presses on element and gets navigated (or it is the same group but user profiles changes), the scroll leaves at the same position.

What you would suggest to do to solve it?

As I imagine, It just should be an option somewhere, something like ?after navigation just scroll to top". Please, help me find it:)

Scroll to the first element

Thank you for an answer, may I ask where I can find this option in editor?

You can put a tiny 1px tall element at the top of the page (or pick some element at the top)
Put some kind of Element ID (enable this in your app settings if you haven’t)

Screenshot_4

Toolbox plugin use the “Run javascript” action

Put this for the script:

document.getElementById("[your Element ID]").scrollIntoView();

Wow, it works, thank you! But I have somewhere 50-100px left to the top of the page, maybe there are some way to fix it?

I found the way to bring it on top, just put the group with id attribute under the floating group. Thank you a lot for your help:)

1 Like