diff --git a/packages/shim/src/globals.js b/packages/shim/src/globals.js index bd837c5..213cbcd 100644 --- a/packages/shim/src/globals.js +++ b/packages/shim/src/globals.js @@ -73,6 +73,15 @@ function installBuffer() { function installWindowClose() { window.close = function () { console.log("[ignis] window.close() blocked"); + + // Obsidian's quit flow shows the progress overlay, awaits its pending save work, then calls window.close(). + // Since we don't actually want to close the window, we clean up the progress state instead. + if (document.body.classList.contains("in-progress")) { + document.querySelector(".progress-bar-container")?.remove(); + document.body.classList.remove("in-progress"); + return; + } + if (!window.__vaultConfig) { showVaultManager(); }