From 8ac1fc6f068cf05373d276243e3af66d5851adb9 Mon Sep 17 00:00:00 2001 From: Evan Song Date: Fri, 18 Oct 2024 00:07:18 -0700 Subject: [PATCH] feat: scroll to top when editing Signed-off-by: Evan Song --- apps/frontend/src/pages/servers/manage/[id]/files.vue | 2 ++ 1 file changed, 2 insertions(+) diff --git a/apps/frontend/src/pages/servers/manage/[id]/files.vue b/apps/frontend/src/pages/servers/manage/[id]/files.vue index 66ff9b5e5..07afe7d3f 100644 --- a/apps/frontend/src/pages/servers/manage/[id]/files.vue +++ b/apps/frontend/src/pages/servers/manage/[id]/files.vue @@ -773,6 +773,8 @@ const editFile = async (item: { name: string; type: string; path: string }) => { const path = `${currentPath.value}/${item.name}`.replace("//", "/"); const content = (await props.server.fs?.downloadFile(path)) as string; + window.scrollTo(0, 0); + fileContent.value = content; editingFile.value = item; isEditing.value = true;