Skip to content

Commit 401a490

Browse files
committed
upd commens
1 parent 370c8d6 commit 401a490

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

src-main/windows/editor.js

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -251,8 +251,9 @@ class EditorWindow extends ProjectRunningWindow {
251251
this.window.webContents.on('will-prevent-unload', () => {
252252
// Using showMessageBoxSync synchronously in the event handler causes broken focus on Windows.
253253
// See https://github.com/TurboWarp/desktop/issues/1245
254-
// To work around that, we'll let the will-prevent-unload event happen so the window stays open,
255-
// then show our own prompt after a very short delay so that window focus doesn't break.
254+
// To work around that, we'll won't cancel that will-prevent-unload event so the window stays
255+
// open. After a very short delay to let focus get fixed, we'll show the dialog and force close
256+
// the window ourselves if the user wants.
256257

257258
setTimeout(() => {
258259
const choice = dialog.showMessageBoxSync(this.window, {

0 commit comments

Comments
 (0)