Disabling auto-scroll back to top

Hey,

On every page load or refresh, Liberty Create automatically scrolls back to the top, regardless of whether you were already at the top, or if it’s just a refresh of the same page triggered by something like live search. Do we have any setting we could configure to disable this behaviour? It’s likely going to cause concern for accessibility and it’s also a bit jarring on the eyes and not as useful as it seems.

I managed to solve the auto-scroll to top if it’s already at the top with a custom theme pack, but a native configuration to disable it outright would be nice.

Cheers

Hi, not sure if this solves your particular use case. But fragments have an option ‘Maintain scroll position’ which has two options, ‘Top Page’ (default) and ‘Maintain Position’ which may help you.

For example, I have used this set to Maintain Position on the Submit element when the user is editing a List Edit widget that has page content above it i.e. the user has scrolled down the page to the data being amended. On submit, the page does not scroll at all. Hope that makes sense, may be it will help you out.

Cheers

John

Thank you for your reply John, unfortunately it doesn’t seem to be working for me; it might be because the submit button is triggered via live search, which is something we do want to keep. I did find a post on here from 2022 where they stated there was no configuration, but I was hoping to see a change in that answer!

Hi @ngohw ,

Thank you for reporting this behaviour.

@JBNZ is right, you can disable it for buttons, actions (etc) manually.

However, there was a bug fix we applied not long ago (7th July) which resolves this exact thing, regardless of theme pack usage - The issue we found was that page navigation would push you to the top of the page. The patch is titled " Fixed unnecessary page scrolling on longer pages"

Try updating your application to include this patch, clear cache and hard refresh and try again.

If this issue persists, please raise a support ticket with any information on how to replicate this in your application, and we’d be happy to investigate this issue further.

Hope this helps :slight_smile:

Thanks Ali, we’re running Citizen Hub 2025.1 patch 2025.1.1060, which I believe has the patch you mentioned applied. The problem still persists. When changing a filter on a search widget, which toggles live search and submits the search widget automatically, it still automatically scrolls back to the top, even though there’s technically no change in the viewport height. Do you have any other suggestions?

Many thanks for your help so far!

Hi @ngohw ,

Sadly, not without investigating. It’ll depend on the configuration of your search widget, there are options to tailor this - However, I think there is a potential bug here that can be investigate.

Please raise a Support Ticket with the necessary details and replication, and we’ll happily investigate this for you.

Hope this helps :slight_smile:

I think this is just a missing feature, the scroll setting is available on the Submit buttons in a Search widget, but when using Live search these are not used.

It should probably use the settings of the first submit button in the form, like it does when hitting enter in a text field.

Yes, that is true - However, even with the submit button there, it will not honour the page position as set in the submit button’s setting - it will scroll to the top. So there is need for investigation anyways.
For Live Search the widget not widget group have any toggleable feature to handle page positioning, but something we can investigate for feasibility.

Thanks both, I’ll raise a support ticket and will update this thread if/once a fix has been identified