chore(): zone.runOutsideAngular

This commit is contained in:
Adam Bradley
2015-10-15 10:29:20 -05:00
parent f2ad705cdd
commit 8a5778661b
5 changed files with 22 additions and 11 deletions

View File

@@ -107,13 +107,15 @@ export class IonicKeyboard {
function enableKeyInput() {
cssClass();
document.removeEventListener('mousedown', pointerDown);
document.removeEventListener('touchstart', pointerDown);
this.zone.runOutsideAngular(() => {
document.removeEventListener('mousedown', pointerDown);
document.removeEventListener('touchstart', pointerDown);
if (isKeyInputEnabled) {
document.addEventListener('mousedown', pointerDown);
document.addEventListener('touchstart', pointerDown);
}
if (isKeyInputEnabled) {
document.addEventListener('mousedown', pointerDown);
document.addEventListener('touchstart', pointerDown);
}
});
}
document.addEventListener('keydown', keyDown);