From b587a0e647a5e3d46f343d42d1a496e32c5bd362 Mon Sep 17 00:00:00 2001 From: Nico Date: Sun, 28 May 2017 20:59:51 +0200 Subject: [PATCH] docs(dialogs): confirm() can return a promise that resolves to 0 (#1617) Document the fact that confirm() will return a promise that resolves to 0 if the user clicks outside the dialog box. This behavior was previously undocummented and could lead to issues if not handled properly. --- src/@ionic-native/plugins/dialogs/index.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/@ionic-native/plugins/dialogs/index.ts b/src/@ionic-native/plugins/dialogs/index.ts index 04ae9166..56c91176 100644 --- a/src/@ionic-native/plugins/dialogs/index.ts +++ b/src/@ionic-native/plugins/dialogs/index.ts @@ -69,7 +69,7 @@ export class Dialogs extends IonicNativePlugin { * @param {string} message Dialog message. * @param {string} title Dialog title. (Optional, defaults to Confirm) * @param {Array} buttonLabels Array of strings specifying button labels. (Optional, defaults to [OK,Cancel]) - * @returns {Promise} Returns a promise that resolves the button index that was clicked. Note that the index use one-based indexing. + * @returns {Promise} Returns a promise that resolves the button index that was clicked, or 0 if the user has dismissed the dialog by clicking outside the dialog box. Note that the index use one-based indexing. */ @Cordova({ successIndex: 1,