document.documentElement.scrollTop = “a saved postion” can't be finished in lazy-loading list

I have a lazy-loading list with a function scrollEvent.
window.addEventListener(“scroll”, this.scrollEvent);
When I scroll down, the scrollEvent will load more items.

I just wanna remain the position when I return to this list from a preview page.
I saved the position when I leave the list.
this.scrollTop = document.documentElement.scrollTop || window.pageYOffset || document.body.scrollTop;
when I return to this list, I use:
document.documentElement.scrollTop = “the saved postion.”

In firefox and safari, it only executes the scrollEvent twice. It can’t reach to “the saved postion.”.
But In chrome and edge, it works greatly. it executes the scrollEvent again and again until it reach the correct position.

Any suggestion?

oh, I got how to do it.

I just think it’s because the scrollTop run too fast to invoke the scroll function again and again in firefox and iphone browser. In chrome, it works ok. so maybe using the “smooth” mode in scrollTo.
My current solution is:
When we return back from the preview page to the list page. the list is very short at that time, we can temperally make it longer. then the scrollTop can go to the right position.
For me, there’s a variable, showLimit. At the beginning, it’s only 50 (items), when I scroll down, the scroll() will make showLimit larger and larger. So, when we back to the list, just make the showLimit big enough immediately to ensure the scrollTop get to the right position. Then we do not need to invoke the scroll function by scrollTop. It works perfectly in firefox and iphone and edge, chrome.