- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎06-09-2023 12:20 AM
When refreshing page (both Classic UI and Portal), the page scroll position is lost and moved to the top position of the page, which is very inconvenient...
Is there any way to keep the scroll position even after refreshing Classic UI and Portal pages?
For example, in portal page, is there any method to define that function somewhere? (Maybe in the Client controller of the widget?)
Best Regards,
Aki
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎06-18-2023 02:41 AM
I thought this is quite an interesting go because especially list count = 100 or with forms that have a huge activity log you tend to scroll a lot.
Also when editing huge script includes you wouldn't need to scroll a lot (note: this is currently not implemented, but will probably be in a future version).
So what you have to do is fork the following repository and then open up the target instance's studio and select "Import From Source Control" (where you specify the newly forked repository):
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎06-22-2023 02:41 AM - edited ‎06-22-2023 03:46 AM
Thx for the info, seems i had a old cached version loaded... fixed it so please sync the repo in github and apply remote changes afterwards in servicenow.
EDIT: Fixed to work with Next Experience. For the Service Portal there is still a limitation: The scroll position is only restored for the list and form page as for all other pages, there is no technique to know when the page has actually loaded and you can restore the position.
Note: This is not working at the moment in the new Polaris UI. Only UI16 + Service Portal (ServicePortal also not on all pages - there is no "page loaded" event in service portal except for the datatable and form pages, so if you want to test it out, please use the form and list page)
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎06-23-2023 01:45 AM
Hi @Markus Kraus ,
Thank you for the update. I applied remote changes, but the scroll position still gets lost after refreshing the pages...
It works for regular list / form pages such as Incident, correct? Could you show me the gif image to show how it works for your environment?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎06-23-2023 06:33 AM - edited ‎06-23-2023 10:11 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎06-26-2023 09:53 PM
Hi @Markus Kraus ,
Thank you for the video. I tried the same way in the Incident form, but still scroll position is not kept after refreshing the page...
> Can you open the console and see if there are any errors?
Do you mean the browser's developer tool?
Here is the Chrome one of the Incident form.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎06-27-2023 12:17 AM
Hm the console errors would have been interesting, but I can see that there aren't any.
Note however that your repository is not yet in sync. You need to sync your repository otherwise it will not work:
After syncing it should hopefully work 🙂