Skip to content

Commit efdc117

Browse files
committed
fix: ゲーム詳細画面の開始時点(切り替え時)でのみスクロール最上部へリセットされるように修正
1 parent 2d00aca commit efdc117

1 file changed

Lines changed: 6 additions & 1 deletion

File tree

src/views/MobileCompanion.svelte

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -295,13 +295,18 @@
295295
296296
const getContentContainer = () => contentContainer;
297297
298-
$: if (activeView === "detail") {
298+
const resetScrollToTop = () => {
299299
void tick().then(() => {
300300
const container = getContentContainer();
301301
if (container) {
302302
container.scrollTop = 0;
303303
}
304304
});
305+
};
306+
307+
$: if (activeView === "detail") {
308+
selectedGameId;
309+
resetScrollToTop();
305310
}
306311
307312
const isObject = (value: unknown): value is Record<string, unknown> =>

0 commit comments

Comments
 (0)