fix(angular): fix handler outside zone

fixes #16338
This commit is contained in:
Manu Mtz.-Almeida
2018-11-16 16:17:00 +01:00
parent 767d299fb2
commit b8dae5e5d5

View File

@ -32,24 +32,27 @@ export function appInitialize(config: Config) {
}
};
Ionic.raf = (cb: any) => {
if (win.__zone_symbol__requestAnimationFrame) {
win.__zone_symbol__requestAnimationFrame(cb);
} else {
win.requestAnimationFrame(cb);
}
};
// define all of Ionic's custom elements
defineCustomElements(win);
}
};
}
const PASS_ZONE = [
'click',
const SKIP_ZONE = [
'scroll',
'resize',
'touchstart',
'touchmove',
'touchend',
'mousedown',
'mousemove',
'mouseup',
'ionStyle',
];
function skipZone(eventName: string) {
return PASS_ZONE.indexOf(eventName) < 0;
return SKIP_ZONE.indexOf(eventName) >= 0;
}