Skip to content

Commit

Permalink
Set electron dialogs to modal by default
Browse files Browse the repository at this point in the history
  • Loading branch information
zole40 committed Nov 1, 2023
1 parent 8578221 commit dd645b0
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions packages/filesystem/src/electron-main/electron-api-main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ export class ElectronApi implements ElectronMainApplicationContribution {
properties: properties
};

if (options.modal) {
if (options.modal !== false) {
const win = BrowserWindow.fromWebContents(event.sender);
if (win) {
return (await dialog.showOpenDialog(win, dialogOpts)).filePaths;
Expand All @@ -65,7 +65,7 @@ export class ElectronApi implements ElectronMainApplicationContribution {
filters: options.filters,
title: options.title
};
if (options.modal) {
if (options.modal !== false) {
const win = BrowserWindow.fromWebContents(event.sender);
if (win) {
return (await dialog.showSaveDialog(win, dialogOpts)).filePath;
Expand Down

0 comments on commit dd645b0

Please sign in to comment.