fix(toast): toast does not disable the app

fixes #9339
This commit is contained in:
Manu Mtz.-Almeida
2016-11-26 18:31:48 +01:00
parent 7018bfe576
commit 75186b447c
4 changed files with 4 additions and 2 deletions

View File

@ -99,7 +99,7 @@ export class ToastCmp implements AfterViewInit {
dismiss(role: any): Promise<any> { dismiss(role: any): Promise<any> {
clearTimeout(this.dismissTimeout); clearTimeout(this.dismissTimeout);
this.dismissTimeout = undefined; this.dismissTimeout = undefined;
return this._viewCtrl.dismiss(null, role); return this._viewCtrl.dismiss(null, role, {disableApp: false});
} }
} }

View File

@ -56,6 +56,7 @@ export class Toast extends ViewController {
* @returns {Promise} Returns a promise which is resolved when the transition has completed. * @returns {Promise} Returns a promise which is resolved when the transition has completed.
*/ */
present(navOptions: NavOptions = {}) { present(navOptions: NavOptions = {}) {
navOptions.disableApp = false;
return this._app.present(this, navOptions, AppPortal.TOAST); return this._app.present(this, navOptions, AppPortal.TOAST);
} }

View File

@ -631,7 +631,7 @@ export class NavControllerBase extends Ion implements NavController {
// this is the top most, or only active transition, so disable the app // this is the top most, or only active transition, so disable the app
// add XXms to the duration the app is disabled when the keyboard is open // add XXms to the duration the app is disabled when the keyboard is open
if (duration > DISABLE_APP_MINIMUM_DURATION) { if (duration > DISABLE_APP_MINIMUM_DURATION && opts.disableApp !== false) {
// if this transition has a duration and this is the root transition // if this transition has a duration and this is the root transition
// then set that the app is actively disabled // then set that the app is actively disabled
this._app.setEnabled(false, duration + ACTIVE_TRANSITION_OFFSET); this._app.setEnabled(false, duration + ACTIVE_TRANSITION_OFFSET);

View File

@ -159,6 +159,7 @@ export interface NavOptions {
id?: string; id?: string;
keyboardClose?: boolean; keyboardClose?: boolean;
progressAnimation?: boolean; progressAnimation?: boolean;
disableApp?: boolean;
ev?: any; ev?: any;
updateUrl?: boolean; updateUrl?: boolean;
isNavRoot?: boolean; isNavRoot?: boolean;