Skip to content

Commit f354d91

Browse files
committed
fix(alert): keyboard is closed
fixes #8185
1 parent 660d531 commit f354d91

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

src/components/alert/alert-component.ts

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -194,9 +194,14 @@ export class AlertCmp {
194194
}
195195

196196
ionViewDidLeave() {
197+
focusOutActiveElement();
197198
this.gestureBlocker.unblock();
198199
}
199200

201+
ionViewWillLeave() {
202+
focusOutActiveElement();
203+
}
204+
200205
ionViewDidEnter() {
201206
// focus out of the active element
202207
focusOutActiveElement();
@@ -254,7 +259,6 @@ export class AlertCmp {
254259

255260
if (shouldDismiss) {
256261
this.dismiss(button.role);
257-
focusOutActiveElement();
258262
}
259263
}
260264

@@ -294,7 +298,6 @@ export class AlertCmp {
294298
}
295299

296300
dismiss(role: any): Promise<any> {
297-
focusOutActiveElement();
298301
return this._viewCtrl.dismiss(this.getValues(), role);
299302
}
300303

0 commit comments

Comments
 (0)