UI Builder - scroll to the top of the page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-17-2025 12:05 PM
On UI Builder is possible to scroll to the top of the page.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-18-2025 09:07 AM
If you are using a web component or container, then try adding it to script with following logic
function handler({helpers}) {
helpers.timing.setTimeout(() => {
const container = document.querySelector('ADD_YOUR_CONTAINER_NAME');
if (container) {
container.scrollTo({
top: 0,
behavior: 'smooth'
});
}
}, 100);
}
Regards,
Ehab Pilloor
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-20-2025 09:46 AM
That's because window is not in the this. scope. Like if you type this. it will bring up a list of valid options to dot walk. Window is not one of them. Top is and dot walking top to window is not either. It's a really limited list (ApiHelpers, api, behavior, event, handler, helpers, imports, params, setTimeout, timing, top). Really feel like they have tied one hand behind our backs.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-20-2025 09:25 AM
I've been playing with this a little, and you get document is undefined. Seems UI Builder doesn't recognize it. I did try your first code. It's valid so far as the syntax checker. But it doesn't do anything for me.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-20-2025 10:06 AM
Curious if the commented code at the top has something to do with the lack of functionality?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-20-2025 12:50 PM
FYI I abandoned this and just went for making the tabs at the top fixed. I guess in doing some research in UI Builder this is more like client side and the tricks we were trying here require server side access.