From cdc6b13fc808bee59e6bcdd4f02a6dbf8821a81b Mon Sep 17 00:00:00 2001 From: James Wheare Date: Fri, 24 Feb 2017 23:56:47 +0000 Subject: [PATCH] Clarify docs for dialog.showMessageBox cancelId --- docs/api/dialog.md | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/docs/api/dialog.md b/docs/api/dialog.md index dc1b665fed13..b96cbbe9aaae 100644 --- a/docs/api/dialog.md +++ b/docs/api/dialog.md @@ -138,11 +138,10 @@ will be passed via `callback(filename)` * `checkboxChecked` Boolean (optional) - Initial checked state of the checkbox. `false` by default. * `icon` [NativeImage](native-image.md) (optional) - * `cancelId` Integer (optional) - The value will be returned when user cancels the dialog - instead of clicking the buttons of the dialog. By default it is the index - of the buttons that have "cancel" or "no" as label, or 0 if there is no such - buttons. On Windows the index of the "Cancel" button will always be used - as `cancelId` even if it is specified. + * `cancelId` Integer (optional) - The index of the button to be used to cancel the dialog, via + the `Esc` key. By default this is assigned to the first button with "cancel" or "no" as the + label. If no such labeled buttons exist and this option is not set, `0` will be used as the + return value or callback response. This option is ignored on Windows. * `noLink` Boolean (optional) - On Windows Electron will try to figure out which one of the `buttons` are common buttons (like "Cancel" or "Yes"), and show the others as command links in the dialog. This can make the dialog appear in