Forum Academy Marketplace Showcase Pricing Features

Scroll to top on page load when unhiding hidden re-usable

Hi, in my single page application I have a task page that sits in a reusable component and which I have reveal whenever someone clicks on a task.

However, if they click on a task when they have scrolled - the task opens up in that scrolled position. I have tried using on page load and scroll to top but that only works on first load.

I tried scrolling to the top of the current page first, then navigating to the page and that works but it looks kind of weird, and I’ve had to add a delay to make sure it gets there, and as such it feels laggy.

I’m now thinking maybe using if element is visible triggered worklow combined with a state, but thought I’d check if I’m not missing an obvious solution.

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