From 42008d1377757a3c76ee9fd49a17c0cea5e7a850 Mon Sep 17 00:00:00 2001 From: かっこかり <67428053+kakkokari-gtyih@users.noreply.github.com> Date: Wed, 15 Oct 2025 12:59:26 +0900 Subject: fix(frontend): デッキのメインカラムのヘッダをクリックしてもページ上部/下部にスクロールしない問題を修正 (#16653) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * fix(frontend): デッキのメインカラムのヘッダをクリックしても上部にスクロールしない問題を修正 * fix * Update Changelog * fix lint --------- Co-authored-by: syuilo <4439005+syuilo@users.noreply.github.com> --- packages/frontend/src/ui/deck/column.vue | 8 +++++++- packages/frontend/src/ui/deck/main-column.vue | 24 +++++++++++++++++++++--- 2 files changed, 28 insertions(+), 4 deletions(-) (limited to 'packages/frontend/src/ui/deck') diff --git a/packages/frontend/src/ui/deck/column.vue b/packages/frontend/src/ui/deck/column.vue index 11937fda24..312ca51c83 100644 --- a/packages/frontend/src/ui/deck/column.vue +++ b/packages/frontend/src/ui/deck/column.vue @@ -62,15 +62,18 @@ const props = withDefaults(defineProps<{ column: Column; isStacked?: boolean; naked?: boolean; + handleScrollToTop?: boolean; menu?: MenuItem[]; refresher?: () => Promise; }>(), { isStacked: false, naked: false, + handleScrollToTop: true, }); const emit = defineEmits<{ (ev: 'headerWheel', ctx: WheelEvent): void; + (ev: 'headerClick', ctx: MouseEvent): void; }>(); const body = useTemplateRef('body'); @@ -252,7 +255,10 @@ function onContextmenu(ev: MouseEvent) { os.contextMenu(getMenu(), ev); } -function goTop() { +function goTop(ev: MouseEvent) { + emit('headerClick', ev); + if (!props.handleScrollToTop) return; + if (body.value) { body.value.scrollTo({ top: 0, diff --git a/packages/frontend/src/ui/deck/main-column.vue b/packages/frontend/src/ui/deck/main-column.vue index 78454d2e49..1388cbdc18 100644 --- a/packages/frontend/src/ui/deck/main-column.vue +++ b/packages/frontend/src/ui/deck/main-column.vue @@ -4,7 +4,13 @@ SPDX-License-Identifier: AGPL-3.0-only --> -- cgit v1.2.3-freya