From 4d0290783bb4a80402b65bd9d03da2b7417ba177 Mon Sep 17 00:00:00 2001 From: Vanessa Date: Wed, 28 Sep 2022 22:13:51 +0800 Subject: [PATCH] =?UTF-8?q?:bug:=20=E8=81=9A=E7=84=A6=E8=BF=94=E5=9B=9E?= =?UTF-8?q?=E6=97=B6=20protyle.contentElement.scrollTop=20=E4=B8=8D?= =?UTF-8?q?=E7=AD=89=E4=BA=8E=200=EF=BC=8C=E4=BC=9A=E5=AF=BC=E8=87=B4?= =?UTF-8?q?=E6=BB=9A=E5=8A=A8=E5=8A=A0=E8=BD=BD=EF=BC=8C=E4=BB=8E=E8=80=8C?= =?UTF-8?q?=E5=AF=BC=E8=87=B4=20showAll=20=E4=B8=BA=20false?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/src/protyle/util/onGet.ts | 1 + 1 file changed, 1 insertion(+) diff --git a/app/src/protyle/util/onGet.ts b/app/src/protyle/util/onGet.ts index f497ac018..0ab1de110 100644 --- a/app/src/protyle/util/onGet.ts +++ b/app/src/protyle/util/onGet.ts @@ -76,6 +76,7 @@ export const onGet = (data: IWebSocketData, protyle: IProtyle, action: string[] protyle.block.id = data.data.id; protyle.scroll.lastScrollTop = 0; protyle.contentElement.scrollTop = 0; + preventScroll(protyle); // 聚焦返回时 protyle.contentElement.scrollTop 不等于 0,会导致滚动加载,从而导致 showAll 为 false protyle.wysiwyg.element.setAttribute("data-doc-type", data.data.type); }