From 6f9901e95fd7e749009049f1e4b90f84ab85374d Mon Sep 17 00:00:00 2001 From: Vanessa Date: Sat, 4 Oct 2025 22:12:23 +0800 Subject: [PATCH] :art: https://github.com/siyuan-note/siyuan/issues/16012 --- app/src/protyle/util/onGet.ts | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/app/src/protyle/util/onGet.ts b/app/src/protyle/util/onGet.ts index beedd4fe5..acce2404c 100644 --- a/app/src/protyle/util/onGet.ts +++ b/app/src/protyle/util/onGet.ts @@ -245,9 +245,10 @@ const setHTML = (options: { protyle.breadcrumb.element.nextElementSibling.textContent = ""; } protyle.element.removeAttribute("disabled-forever"); - setReadonlyByConfig(protyle, updateReadonly); - if (options.action.includes(Constants.CB_GET_OPENNEW) && window.siyuan.config.editor.readOnly) { - updateReadonlyMethod(protyle.breadcrumb.element.parentElement.querySelector('.block__icon[data-type="readonly"]'), protyle); + if (options.action.includes(Constants.CB_GET_OPENNEW) && window.siyuan.config.editor.readOnly && !window.siyuan.config.readonly) { + enableProtyle(protyle); + } else { + setReadonlyByConfig(protyle, updateReadonly); } }