-
-
Notifications
You must be signed in to change notification settings - Fork 1.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
This will now allow the dialog to call the resolve function when cancelled by clicking outside. #1086
Conversation
…eled by clicking outside of the dialog.
Can one of the admins verify this patch? |
Hey @NathanaelA, According to your code you should have Thanks |
This comment was marked as abuse.
This comment was marked as abuse.
Hey @NathanaelA, Maybe it will be useful if we can have /**
* Provides options for the dialog.
*/
export interface CancelableOptions {
/**
* [Android only] Gets or sets if the dialog can be canceled by taping outside of the dialog.
*/
cancelable?: boolean;
}
/**
* Provides options for the dialog.
*/
export interface ActionOptions extends CancelableOptions {
/**
* Gets or sets the dialog title.
*/
title?: string;
/**
* Gets or sets the dialog message.
*/
message?: string;
/**
* Gets or sets the Cancel button text.
*/
cancelButtonText?: string;
/**
* Gets or sets the list of available actions.
*/
actions?: Array<string>;
}
/**
* Provides options for the dialog.
*/
export interface DialogOptions extends CancelableOptions {
/**
* Gets or sets the dialog title.
*/
title?: string;
/**
* Gets or sets the dialog message.
*/
message?: string;
} |
This comment was marked as abuse.
This comment was marked as abuse.
@@ -262,6 +275,9 @@ export function action(arg: any): Promise<string> { | |||
var alert = new android.app.AlertDialog.Builder(activity); | |||
var message = options && types.isString(options.message) ? options.message : ""; | |||
var title = options && types.isString(options.title) ? options.title : ""; | |||
if (options && (options.cancelable === false || options.cancelable === 0)) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hey @NathanaelA,
Please remove options.cancelable === 0
- this cannot be compiled since the property is boolean.
Thanks
This comment was marked as abuse.
This comment was marked as abuse.
@NathanaelA: well, there is a problem with the grunt-ts task, where it just does not stop the entire build when broken (I'm sorry I did not spare the time to either fix that or find a workaround for it) I believe this is what you hit. Try running |
run ci |
Test PASSed. |
👍 |
This will now allow the dialog to call the resolve function when cancelled by clicking outside.
This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs. |
All the dialogs also suffer on Android from the click outside and then not having the promise resolved or rejected.
This code does two different things: