mirror of
https://github.com/Nystik-gh/ignis.git
synced 2026-06-17 04:35:53 +00:00
dismiss Obsidian's quit overlay when window.close is blocked
This commit is contained in:
@@ -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();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user