Skip to content

Commit 65d922a

Browse files
committed
Fix problem with app menu appearing on modal dialogs in Linux
1 parent 4295659 commit 65d922a

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

electron/app/js/promptUtils.js

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@ async function getCredentialPassphrase(parentWindow) {
3232
alwaysOnTop: false,
3333
useContentSize: true,
3434
modal: Boolean(parentWindow),
35+
autoHideMenuBar: true,
3536
menuBarVisible: false,
3637
webPreferences: {
3738
nodeIntegration: false,
@@ -42,7 +43,9 @@ async function getCredentialPassphrase(parentWindow) {
4243
},
4344
});
4445

46+
// hide app menu for various platforms
4547
promptWindow.setMenu(null);
48+
promptWindow.removeMenu();
4649
promptWindow.setMenuBarVisibility(false);
4750

4851
const getOptionsListener = event => {
@@ -128,7 +131,8 @@ async function showAboutDialog(wktApp, parentWindow) {
128131
skipTaskbar: true,
129132
alwaysOnTop: false,
130133
useContentSize: true,
131-
modal: Boolean(parentWindow),
134+
modal: Boolean(parentWindow), // false causes problems with app menu appearing
135+
autoHideMenuBar: true,
132136
menuBarVisible: false,
133137
webPreferences: {
134138
nodeIntegration: false,
@@ -139,7 +143,9 @@ async function showAboutDialog(wktApp, parentWindow) {
139143
},
140144
});
141145

146+
// hide app menu for various platforms
142147
promptWindow.setMenu(null);
148+
promptWindow.removeMenu();
143149
promptWindow.setMenuBarVisibility(false);
144150

145151
const getOptionsListener = event => {

0 commit comments

Comments
 (0)