Clarify docs for dialog.showMessageBox cancelId
authorJames Wheare <james@wheare.org>
Fri, 24 Feb 2017 23:56:47 +0000 (23:56 +0000)
committerGitHub <noreply@github.com>
Fri, 24 Feb 2017 23:56:47 +0000 (23:56 +0000)
docs/api/dialog.md

index dc1b665..b96cbbe 100644 (file)
@@ -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