From 7223dec015af9f2d5171901fcbb2ce7cb34903ae Mon Sep 17 00:00:00 2001 From: Vanessa Date: Fri, 3 Jun 2022 11:11:33 +0800 Subject: [PATCH] :art: https://github.com/siyuan-note/siyuan/issues/5087 2 --- app/src/layout/dock/Outline.ts | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/app/src/layout/dock/Outline.ts b/app/src/layout/dock/Outline.ts index bb62a4890..2dc330417 100644 --- a/app/src/layout/dock/Outline.ts +++ b/app/src/layout/dock/Outline.ts @@ -147,6 +147,15 @@ export class Outline extends Model { getDockByType("outline").toggleModel("outline"); break; } + break; + } else if (target.isSameNode(this.headerElement.nextElementSibling) || target.classList.contains("block__icons")) { + getAllModels().editor.find(item => { + if (this.blockId === item.editor.protyle.block.rootID) { + item.editor.protyle.contentElement.scrollTop = 0; + return true; + } + }); + break; } target = target.parentElement; } @@ -163,7 +172,7 @@ export class Outline extends Model { } } - public updateDocTitle(ial?:IObject) { + public updateDocTitle(ial?: IObject) { if (this.type === "pin") { if (ial) { let iconHTML = `${unicode2Emoji(ial.icon || Constants.SIYUAN_IMAGE_FILE)}`;