Skip to content

Commit e0e5b34

Browse files
committed
fix: multi window electon app not quitting
1 parent 86154c9 commit e0e5b34

1 file changed

Lines changed: 8 additions & 1 deletion

File tree

src/document/DocumentCommandHandlers.js

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2268,7 +2268,14 @@ define(function (require, exports, module) {
22682268
raceAgainstTime(_safeNodeTerminate())
22692269
.finally(()=>{
22702270
closeInProgress = false;
2271-
Phoenix.app.closeWindow();
2271+
// In Electron, we must call allowClose() to complete the original
2272+
// close request (sets forceClose=true). Calling closeWindow() would
2273+
// trigger a new close sequence and cause an infinite loop.
2274+
if(window.__ELECTRON__) {
2275+
window.electronAPI.allowClose();
2276+
} else {
2277+
Phoenix.app.closeWindow();
2278+
}
22722279
});
22732280
});
22742281
}, closeFail=>{

0 commit comments

Comments
 (0)