Store scroll offset in cache back button

This commit is contained in:
cuom1999 2024-02-05 15:33:58 -06:00
parent ea2c7d2f36
commit 2a4882f598

View file

@ -476,6 +476,7 @@ $(function() {
"html": $contentClone.html(), "html": $contentClone.html(),
"page": window.page, "page": window.page,
"has_next_page": window.has_next_page, "has_next_page": window.has_next_page,
"scrollOffset": $(window).scrollTop(),
})); }));
}); });
if (window.performance && if (window.performance &&
@ -487,6 +488,7 @@ $(function() {
content = JSON.parse(content); content = JSON.parse(content);
$('#content').html(content.html); $('#content').html(content.html);
onWindowReady(); onWindowReady();
$(window).scrollTop(content.scrollOffset);
window.page = content.page; window.page = content.page;
window.has_next_page = content.has_next_page; window.has_next_page = content.has_next_page;
} }