aboutsummaryrefslogtreecommitdiff
path: root/web
diff options
context:
space:
mode:
authortpart <tpart120@proton.me>2024-04-10 19:50:12 +0200
committertpart <tpart120@proton.me>2024-04-10 19:50:12 +0200
commit18e23f2454cc6b3a75165eaafebe6c51bbe1f1d0 (patch)
tree9cedde4fe949101084b66ce6cb8807644580e802 /web
parent14530cbab85d1e95995b8965bd11ef38822fd20c (diff)
downloadjellything-18e23f2454cc6b3a75165eaafebe6c51bbe1f1d0.tar
jellything-18e23f2454cc6b3a75165eaafebe6c51bbe1f1d0.tar.bz2
jellything-18e23f2454cc6b3a75165eaafebe6c51bbe1f1d0.tar.zst
Scroll to top of page when clicking item
Diffstat (limited to 'web')
-rw-r--r--web/script/transition.ts1
1 files changed, 1 insertions, 0 deletions
diff --git a/web/script/transition.ts b/web/script/transition.ts
index 03338ca..26630ee 100644
--- a/web/script/transition.ts
+++ b/web/script/transition.ts
@@ -70,6 +70,7 @@ function prepare_load(href: string, back?: boolean) {
document.head.innerHTML = head
document.body.outerHTML = body
globalThis.dispatchEvent(new Event("DOMContentLoaded"))
+ window.scrollTo({ top: 0 });
fade(true)
}
}