Fix default file name in save-image-as (#385)

This commit is contained in:
Michael Telatynski 2022-06-30 15:09:34 +01:00 committed by GitHub
parent b27f72e3a3
commit b7a0402de5
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -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,
});