From c7cba8a8312ebfd355d55eb0bf051166d1ab7bbc Mon Sep 17 00:00:00 2001 From: Vanessa Date: Sun, 29 Oct 2023 19:49:36 +0800 Subject: [PATCH] :art: fix https://github.com/siyuan-note/siyuan/issues/9515 --- app/src/dialog/processSystem.ts | 3 ++- app/src/protyle/util/destroy.ts | 3 +++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/app/src/dialog/processSystem.ts b/app/src/dialog/processSystem.ts index 1681e7ab2..fc1f115ad 100644 --- a/app/src/dialog/processSystem.ts +++ b/app/src/dialog/processSystem.ts @@ -18,7 +18,7 @@ import {getAllModels} from "../layout/getAll"; import {reloadProtyle} from "../protyle/util/reload"; import {Tab} from "../layout/Tab"; import {setEmpty} from "../mobile/util/setEmpty"; -import {hideElements} from "../protyle/ui/hideElements"; +import {hideAllElements, hideElements} from "../protyle/ui/hideElements"; import {App} from "../index"; import {saveScroll} from "../protyle/scroll/saveScroll"; import {isInAndroid, isInIOS} from "../protyle/util/compatibility"; @@ -168,6 +168,7 @@ export const kernelError = () => { }; export const exitSiYuan = () => { + hideAllElements(["util"]); /// #if MOBILE saveScroll(window.siyuan.mobile.editor.protyle); /// #endif diff --git a/app/src/protyle/util/destroy.ts b/app/src/protyle/util/destroy.ts index 75af11a53..23b3358cb 100644 --- a/app/src/protyle/util/destroy.ts +++ b/app/src/protyle/util/destroy.ts @@ -1,7 +1,10 @@ +import {hideElements} from "../ui/hideElements"; + export const destroy = (protyle: IProtyle) => { if (!protyle) { return; } + hideElements(["util"], protyle); protyle.element.classList.remove("protyle"); protyle.element.removeAttribute("style"); if (protyle.wysiwyg) {