From bc77baca2eea2133344df358a1ad4b325ccd173a Mon Sep 17 00:00:00 2001 From: Mischa Date: Sun, 21 Jun 2026 20:41:41 +0200 Subject: [PATCH] fix(scroll): clear URL hash when back-to-top is clicked Uses history.pushState to strip the stale #entry-slug without triggering a page jump, then smooth-scrolls to the top. Co-Authored-By: Claude Sonnet 4.6 Claude-Session: https://claude.ai/code/session_01Vgmzx8VTTTmCskSpQtsLTr --- themes/intotheeast/templates/trip.html.twig | 1 + 1 file changed, 1 insertion(+) diff --git a/themes/intotheeast/templates/trip.html.twig b/themes/intotheeast/templates/trip.html.twig index 3d2f169..93d79a6 100644 --- a/themes/intotheeast/templates/trip.html.twig +++ b/themes/intotheeast/templates/trip.html.twig @@ -567,6 +567,7 @@ document.addEventListener('DOMContentLoaded', function () { var threshold = window.innerHeight * 0.8; var shown = false; btn.addEventListener('click', function () { + history.pushState(null, '', window.location.pathname + window.location.search); window.scrollTo({ top: 0, behavior: 'smooth' }); }); window.addEventListener('scroll', function () {