From cde8c5c4184bcfc64f1ee665521088ce328360c4 Mon Sep 17 00:00:00 2001 From: niubility000 <76441520+niubility000@users.noreply.github.com> Date: Sat, 16 Mar 2024 03:29:18 +0800 Subject: [PATCH] Feat: stay in the same position of the list when back from a sub folder --- frontend/src/components/files/ListingItem.vue | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/frontend/src/components/files/ListingItem.vue b/frontend/src/components/files/ListingItem.vue index f7733b87..d5fea95c 100644 --- a/frontend/src/components/files/ListingItem.vue +++ b/frontend/src/components/files/ListingItem.vue @@ -247,6 +247,10 @@ export default { this.addSelected(this.index); }, open: function () { + window.sessionStorage.setItem( + this.$route.path, + JSON.stringify([document.documentElement.scrollTop, this.index]) + ); this.$router.push({ path: this.url }); }, },