Skip to content

Commit 75186b4

Browse files
committed
fix(toast): toast does not disable the app
fixes #9339
1 parent 7018bfe commit 75186b4

File tree

4 files changed

+4
-2
lines changed

4 files changed

+4
-2
lines changed

src/components/toast/toast-component.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,7 @@ export class ToastCmp implements AfterViewInit {
9999
dismiss(role: any): Promise<any> {
100100
clearTimeout(this.dismissTimeout);
101101
this.dismissTimeout = undefined;
102-
return this._viewCtrl.dismiss(null, role);
102+
return this._viewCtrl.dismiss(null, role, {disableApp: false});
103103
}
104104

105105
}

src/components/toast/toast.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,7 @@ export class Toast extends ViewController {
5656
* @returns {Promise} Returns a promise which is resolved when the transition has completed.
5757
*/
5858
present(navOptions: NavOptions = {}) {
59+
navOptions.disableApp = false;
5960
return this._app.present(this, navOptions, AppPortal.TOAST);
6061
}
6162

src/navigation/nav-controller-base.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -631,7 +631,7 @@ export class NavControllerBase extends Ion implements NavController {
631631
// this is the top most, or only active transition, so disable the app
632632
// add XXms to the duration the app is disabled when the keyboard is open
633633

634-
if (duration > DISABLE_APP_MINIMUM_DURATION) {
634+
if (duration > DISABLE_APP_MINIMUM_DURATION && opts.disableApp !== false) {
635635
// if this transition has a duration and this is the root transition
636636
// then set that the app is actively disabled
637637
this._app.setEnabled(false, duration + ACTIVE_TRANSITION_OFFSET);

src/navigation/nav-util.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -159,6 +159,7 @@ export interface NavOptions {
159159
id?: string;
160160
keyboardClose?: boolean;
161161
progressAnimation?: boolean;
162+
disableApp?: boolean;
162163
ev?: any;
163164
updateUrl?: boolean;
164165
isNavRoot?: boolean;

0 commit comments

Comments
 (0)