Skip to main content
All CollectionsHelp & Troubleshooting GuidesTesting Your App
Scroll To Action Is Not Working When Used On Page Load
Scroll To Action Is Not Working When Used On Page Load
David avatar
Written by David
Updated over a year ago

Issue

I am using on Scroll To Action for an On Page Load action chain. It is not working as expected.
โ€‹


Background

When you add an action to a page load, it executes before everything else. So you may be trying to scroll a widget that doesn't exist yet.


Solution

The solution is to wait until the page is fully loaded before executing the scroll action.
For this, we could use a delay action before the scroll to action for just 500 to 700 milliseconds (example below).

Now the page has time to build and the moment you execute the scroll action the scrollable widget exists.

You can also add an animation to the scrollable widget, on load animation. So this way widget will be animated and then scroll to action will execute and the user doesn't see a break or jump on the UI.

For example: if you have a fade animation for 1200 milliseconds on your listView, also a delay for 700 milliseconds after that doing the scroll, users don't feel anything.
โ€‹

Did this answer your question?