Skip to content

An open-source, privacy-first, self-hosted knowledge workspace where humans and AI agents work together 开源、隐私优先、自托管的知识工作空间,让人与智能体在此协作

:art: fix https://github.com/siyuan-note/siyuan/issues/9580

Vanessaa5f60614aec5
diff --git a/app/src/boot/onGetConfig.ts b/app/src/boot/onGetConfig.ts
index 2a6b7f3b5a..e3356b41fc 100644
--- a/app/src/boot/onGetConfig.ts
+++ b/app/src/boot/onGetConfig.ts
@@ -309,11 +309,13 @@ export const initWindow = async (app: App) => {
const focus = urlObj.searchParams.get("focus") === "1";
fetchPost("/api/block/checkBlockExist", {id}, existResponse => {
if (existResponse.data) {
- openFileById({
- app,
- id,
- action: [Constants.CB_GET_FOCUS, Constants.CB_GET_CONTEXT, Constants.CB_GET_ROOTSCROLL],
- zoomIn: focus,
+ fetchPost("/api/block/checkBlockFold", {id}, (foldResponse) => {
+ openFileById({
+ app,
+ id,
+ action: (foldResponse.data || focus) ? [Constants.CB_GET_FOCUS, Constants.CB_GET_ALL] : [Constants.CB_GET_FOCUS, Constants.CB_GET_CONTEXT, Constants.CB_GET_ROOTSCROLL],
+ zoomIn: foldResponse.data || focus
+ });
});
ipcRenderer.send(Constants.SIYUAN_CMD, "show");
}
diff --git a/app/src/protyle/wysiwyg/index.ts b/app/src/protyle/wysiwyg/index.ts
index 9b63ab57fb..9c2f4905a6 100644
--- a/app/src/protyle/wysiwyg/index.ts
+++ b/app/src/protyle/wysiwyg/index.ts
@@ -1708,10 +1708,6 @@ export class WYSIWYG {
activeBlur();
hideKeyboardToolbar();
/// #else
- if (aElement) {
- window.open(aLink);
- return;
- }
if (event.shiftKey) {
openFileById({
app: protyle.app,