From 2ba74d7ac0686cda08682e1ee26c390f105c67b5 Mon Sep 17 00:00:00 2001 From: Christopher Willis-Ford <7019101+cwillisf@users.noreply.github.com> Date: Wed, 10 Nov 2021 07:04:29 -0800 Subject: [PATCH] work around Electron dialog title bug In previous versions of this app, Electron automaticaly put "Scratch" in the title bar for these dialogs. See https://github.com/electron/electron/issues/30223 --- src/main/index.js | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/main/index.js b/src/main/index.js index 0129aa3..b412fd5 100644 --- a/src/main/index.js +++ b/src/main/index.js @@ -292,6 +292,7 @@ const createMainWindow = () => { // don't clean up until after the message box to allow troubleshooting / recovery await dialog.showMessageBox(window, { type: 'error', + title: 'Failed to save project', message: `Save failed:\n${userChosenPath}`, detail: e.message }); @@ -312,6 +313,7 @@ const createMainWindow = () => { webContents.on('will-prevent-unload', ev => { const choice = dialog.showMessageBoxSync(window, { + title: productName, type: 'question', message: 'Leave Scratch?', detail: 'Any unsaved changes will be lost.',