fix: stay in the same position after renaming or deleting

This commit is contained in:
niubility000 2024-03-07 11:11:22 +08:00 committed by GitHub
parent 065d3a6ab4
commit 27648d1e9b
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 8 additions and 3 deletions

View File

@ -1,5 +1,9 @@
<template>
<div id="editor-container">
<div
id="editor-container"
@touchmove.prevent.stop
@wheel.prevent.stop
>
<header-bar>
<action icon="close" :label="$t('buttons.close')" @action="close()" />
<title>{{ req.name }}</title>

View File

@ -383,7 +383,7 @@ export default {
},
watch: {
req: function () {
if (window.sessionStorage.getItem('listFrozen') !=="true"){
if (window.sessionStorage.getItem("listFrozen") !=="true" && window.sessionStorage.getItem("modified") !=="true"){
// Reset the show value
this.showLimit = 50;
@ -397,7 +397,8 @@ export default {
});
}
if (this.req.isDir) {
window.sessionStorage.setItem('listFrozen', "false");
window.sessionStorage.setItem("listFrozen", "false");
window.sessionStorage.setItem("modified", "false");
}
},
},