From acac759d8720f72ef21c14e521a864a74414cb08 Mon Sep 17 00:00:00 2001 From: syuilo <4439005+syuilo@users.noreply.github.com> Date: Thu, 20 Mar 2025 08:35:45 +0900 Subject: [PATCH] =?UTF-8?q?fix(frontend):=20=E3=83=A2=E3=83=90=E3=82=A4?= =?UTF-8?q?=E3=83=AB=E3=83=AC=E3=82=A4=E3=82=A2=E3=82=A6=E3=83=88=E6=99=82?= =?UTF-8?q?=E3=81=AB=E3=83=9B=E3=83=BC=E3=83=A0=E3=82=92=E6=8A=BC=E3=81=97?= =?UTF-8?q?=E3=81=A6=E3=82=82=E6=9C=80=E4=B8=8A=E9=83=A8=E3=81=B8=E3=82=B9?= =?UTF-8?q?=E3=82=AF=E3=83=AD=E3=83=BC=E3=83=AB=E3=81=95=E3=82=8C=E3=81=AA?= =?UTF-8?q?=E3=81=84?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Fix #15679 --- packages/frontend/src/pages/timeline.vue | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/packages/frontend/src/pages/timeline.vue b/packages/frontend/src/pages/timeline.vue index 38497e7c1b..05afc3471f 100644 --- a/packages/frontend/src/pages/timeline.vue +++ b/packages/frontend/src/pages/timeline.vue @@ -56,12 +56,18 @@ import { deepMerge } from '@/utility/merge.js'; import { miLocalStorage } from '@/local-storage.js'; import { availableBasicTimelines, hasWithReplies, isAvailableBasicTimeline, isBasicTimeline, basicTimelineIconClass } from '@/timelines.js'; import { prefer } from '@/preferences.js'; +import { useRouter } from '@/router.js'; provide('shouldOmitHeaderTitle', true); const tlComponent = useTemplateRef('tlComponent'); const rootEl = useTemplateRef('rootEl'); +const router = useRouter(); +router.useListener('same', () => { + top(); +}); + type TimelinePageSrc = BasicTimelineType | `list:${string}`; const queue = ref(0); @@ -128,7 +134,7 @@ function queueUpdated(q: number): void { } function top(): void { - if (rootEl.value) scroll(rootEl.value, { top: 0 }); + if (rootEl.value) scroll(rootEl.value, { top: 0, behavior: 'smooth' }); } async function chooseList(ev: MouseEvent): Promise<void> {