mirror of
https://github.com/misskey-dev/misskey.git
synced 2026-06-14 02:04:53 +02:00
fix(frontend): デッキのメインカラムのヘッダをクリックしてもページ上部/下部にスクロールしない問題を修正 (#16653)
* fix(frontend): デッキのメインカラムのヘッダをクリックしても上部にスクロールしない問題を修正 * fix * Update Changelog * fix lint --------- Co-authored-by: syuilo <4439005+syuilo@users.noreply.github.com>
This commit is contained in:
@@ -62,15 +62,18 @@ const props = withDefaults(defineProps<{
|
||||
column: Column;
|
||||
isStacked?: boolean;
|
||||
naked?: boolean;
|
||||
handleScrollToTop?: boolean;
|
||||
menu?: MenuItem[];
|
||||
refresher?: () => Promise<void>;
|
||||
}>(), {
|
||||
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,
|
||||
|
||||
Reference in New Issue
Block a user