Skip to content

Commit 8ac1fc6

Browse files
committed
feat: scroll to top when editing
Signed-off-by: Evan Song <theevansong@gmail.com>
1 parent 46ce5ff commit 8ac1fc6

File tree

1 file changed

+2
-0
lines changed
  • apps/frontend/src/pages/servers/manage/[id]

1 file changed

+2
-0
lines changed

apps/frontend/src/pages/servers/manage/[id]/files.vue

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -773,6 +773,8 @@ const editFile = async (item: { name: string; type: string; path: string }) => {
773773
const path = `${currentPath.value}/${item.name}`.replace("//", "/");
774774
const content = (await props.server.fs?.downloadFile(path)) as string;
775775
776+
window.scrollTo(0, 0);
777+
776778
fileContent.value = content;
777779
editingFile.value = item;
778780
isEditing.value = true;

0 commit comments

Comments
 (0)