From 3df605d2e7b20b483d23b7c40bee22c596006d88 Mon Sep 17 00:00:00 2001 From: Vanessa Date: Sun, 2 Oct 2022 12:08:47 +0800 Subject: [PATCH] :sparkles: fix https://github.com/siyuan-note/siyuan/issues/6033 --- app/src/layout/dock/Files.ts | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/app/src/layout/dock/Files.ts b/app/src/layout/dock/Files.ts index 4aa76c5fc..b8dd7fad4 100644 --- a/app/src/layout/dock/Files.ts +++ b/app/src/layout/dock/Files.ts @@ -772,12 +772,7 @@ export class Files extends Model { liItem.classList.remove("b3-list-item--focus"); }); target.classList.add("b3-list-item--focus"); - const titleHeight = this.actionsElement.clientHeight; - if (target.offsetTop - titleHeight < this.element.scrollTop) { - this.element.scrollTop = target.offsetTop - titleHeight; - } else if (target.offsetTop - this.element.clientHeight - titleHeight + target.clientHeight > this.element.scrollTop) { - this.element.scrollTop = target.offsetTop - this.element.clientHeight - titleHeight + target.clientHeight; - } + this.element.scrollTop = target.offsetTop - this.element.clientHeight / 2 - this.actionsElement.clientHeight; } public getLeaf(liElement: Element, notebookId: string) {