Scroll to top on page change, #261

pull/265/head
AlUlkesh 2024-12-14 20:50:00 +01:00
parent f3b0395449
commit 034c24f173
1 changed files with 8 additions and 0 deletions

View File

@ -171,6 +171,14 @@ async function image_browser_turnpage(tab_base_tag) {
} catch (e) {
console.error(e)
}
// Scroll to top of grid
try {
const gridWrapElement = document.getElementById(tab_base_tag + "_image_browser_gallery").querySelector("div.grid-wrap")
gridWrapElement.scrollTop = 0
gridWrapElement.scrollLeft= 0
} catch (e) { }
if (image_browser_debug) console.log("image_browser_turnpage:end")
}