From 2710e3485178da984d32473956ca5b309e631f6c Mon Sep 17 00:00:00 2001 From: Adam Bradley Date: Fri, 5 Feb 2016 09:38:16 -0600 Subject: [PATCH] fix(alert): ensure keyup listener has been removed --- ionic/components/alert/alert.ts | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/ionic/components/alert/alert.ts b/ionic/components/alert/alert.ts index c407661a27..4730c07462 100644 --- a/ionic/components/alert/alert.ts +++ b/ionic/components/alert/alert.ts @@ -473,6 +473,10 @@ class AlertCmp { onPageWillLeave() { document.removeEventListener('keyup', this.keyUp); } + + ngOnDestroy() { + document.removeEventListener('keyup', this.keyUp); + } }