From 18e23f2454cc6b3a75165eaafebe6c51bbe1f1d0 Mon Sep 17 00:00:00 2001 From: tpart Date: Wed, 10 Apr 2024 19:50:12 +0200 Subject: Scroll to top of page when clicking item --- web/script/transition.ts | 1 + 1 file changed, 1 insertion(+) (limited to 'web/script/transition.ts') 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) } } -- cgit v1.2.3-70-g09d2