Skip to content

Commit

Permalink
Fix default file name in save-image-as (#385)
Browse files Browse the repository at this point in the history
  • Loading branch information
t3chguy committed Jun 30, 2022
1 parent b27f72e commit b7a0402
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/webcontents-handler.ts
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,7 @@ function onLinkContextMenu(ev: Event, params: ContextMenuParams, webContents: We
label: _t('Save image as...'),
accelerator: 's',
async click() {
const targetFileName = params.titleText || "image.png";
const targetFileName = params.suggestedFilename || params.altText || "image.png";
const { filePath } = await dialog.showSaveDialog({
defaultPath: targetFileName,
});
Expand Down

0 comments on commit b7a0402

Please sign in to comment.