From b7d999744a47f4fed1aab1f008fff5522d4f95a4 Mon Sep 17 00:00:00 2001 From: Daniel <845765@qq.com> Date: Sun, 1 Mar 2026 12:24:57 +0800 Subject: [PATCH] :art: The browser redirects to a blank page when exiting the application https://github.com/siyuan-note/siyuan/issues/16945 Signed-off-by: Daniel <845765@qq.com> --- app/src/index.ts | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/app/src/index.ts b/app/src/index.ts index 3c6a1a927..a5717a2e3 100644 --- a/app/src/index.ts +++ b/app/src/index.ts @@ -26,7 +26,7 @@ import { import {initMessage, showMessage} from "./dialog/message"; import {getAllTabs} from "./layout/getAll"; import {getLocalStorage, isChromeBrowser, isInMobileApp} from "./protyle/util/compatibility"; -import {getSearch} from "./util/functions"; +import {getSearch, isBrowser} from "./util/functions"; import {checkPublishServiceClosed} from "./util/processMessage"; import {hideAllElements} from "./protyle/ui/hideElements"; import {loadPlugins, reloadPlugin} from "./plugin/loader"; @@ -188,6 +188,10 @@ export class App { case "openFileById": openFileById({app: this, id: data.data.id, action: [Constants.CB_GET_FOCUS]}); break; + case "exit": + if (isBrowser()) { + window.location.href = "about:blank"; + } } } }