From f354d9163b643bd94c6f0ee4353fa88b70f54265 Mon Sep 17 00:00:00 2001 From: "Manu Mtz.-Almeida" Date: Mon, 5 Dec 2016 16:59:41 +0100 Subject: [PATCH] fix(alert): keyboard is closed fixes #8185 --- src/components/alert/alert-component.ts | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/components/alert/alert-component.ts b/src/components/alert/alert-component.ts index 8e542e88a6e..8fabda89e16 100644 --- a/src/components/alert/alert-component.ts +++ b/src/components/alert/alert-component.ts @@ -194,9 +194,14 @@ export class AlertCmp { } ionViewDidLeave() { + focusOutActiveElement(); this.gestureBlocker.unblock(); } + ionViewWillLeave() { + focusOutActiveElement(); + } + ionViewDidEnter() { // focus out of the active element focusOutActiveElement(); @@ -254,7 +259,6 @@ export class AlertCmp { if (shouldDismiss) { this.dismiss(button.role); - focusOutActiveElement(); } } @@ -294,7 +298,6 @@ export class AlertCmp { } dismiss(role: any): Promise { - focusOutActiveElement(); return this._viewCtrl.dismiss(this.getValues(), role); }