Skip to content

Commit

Permalink
fix(toast): toast does not disable the app
Browse files Browse the repository at this point in the history
fixes #9339
  • Loading branch information
manucorporat committed Nov 26, 2016
1 parent 7018bfe commit 75186b4
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/components/toast/toast-component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ export class ToastCmp implements AfterViewInit {
dismiss(role: any): Promise<any> {
clearTimeout(this.dismissTimeout);
this.dismissTimeout = undefined;
return this._viewCtrl.dismiss(null, role);
return this._viewCtrl.dismiss(null, role, {disableApp: false});
}

}
Expand Down
1 change: 1 addition & 0 deletions src/components/toast/toast.ts
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,7 @@ export class Toast extends ViewController {
* @returns {Promise} Returns a promise which is resolved when the transition has completed.
*/
present(navOptions: NavOptions = {}) {
navOptions.disableApp = false;
return this._app.present(this, navOptions, AppPortal.TOAST);
}

Expand Down
2 changes: 1 addition & 1 deletion src/navigation/nav-controller-base.ts
Original file line number Diff line number Diff line change
Expand Up @@ -631,7 +631,7 @@ export class NavControllerBase extends Ion implements NavController {
// 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

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
// then set that the app is actively disabled
this._app.setEnabled(false, duration + ACTIVE_TRANSITION_OFFSET);
Expand Down
1 change: 1 addition & 0 deletions src/navigation/nav-util.ts
Original file line number Diff line number Diff line change
Expand Up @@ -159,6 +159,7 @@ export interface NavOptions {
id?: string;
keyboardClose?: boolean;
progressAnimation?: boolean;
disableApp?: boolean;
ev?: any;
updateUrl?: boolean;
isNavRoot?: boolean;
Expand Down

0 comments on commit 75186b4

Please sign in to comment.