This repository was archived by the owner on Feb 26, 2024. It is now read-only.
File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -94,6 +94,9 @@ export function patchEventTarget(
9494
9595 // global shared zoneAwareCallback to handle all event callback with capture = false
9696 const globalZoneAwareCallback = function ( event : Event ) {
97+ // https://github.com/angular/zone.js/issues/911, in IE, sometimes
98+ // event will be undefined, so we need to use window.event
99+ event = event || _global . event ;
97100 if ( ! event ) {
98101 return ;
99102 }
@@ -123,6 +126,9 @@ export function patchEventTarget(
123126
124127 // global shared zoneAwareCallback to handle all event callback with capture = true
125128 const globalZoneAwareCaptureCallback = function ( event : Event ) {
129+ // https://github.com/angular/zone.js/issues/911, in IE, sometimes
130+ // event will be undefined, so we need to use window.event
131+ event = event || _global . event ;
126132 if ( ! event ) {
127133 return ;
128134 }
Original file line number Diff line number Diff line change @@ -87,15 +87,20 @@ export const isMix: boolean = typeof _global.process !== 'undefined' &&
8787 { } . toString . call ( _global . process ) === '[object process]' && ! isWebWorker &&
8888 ! ! ( typeof window !== 'undefined' && ( window as any ) [ 'HTMLElement' ] ) ;
8989
90- const ON_PROPERTY_HANDLER_SYMBOL = zoneSymbol ( 'onPropertyHandler' ) ;
9190const zoneSymbolEventNames : { [ eventName : string ] : string } = { } ;
9291
9392const wrapFn = function ( event : Event ) {
93+ // https://github.com/angular/zone.js/issues/911, in IE, sometimes
94+ // event will be undefined, so we need to use window.event
95+ event = event || _global . event ;
96+ if ( ! event ) {
97+ return ;
98+ }
9499 let eventNameSymbol = zoneSymbolEventNames [ event . type ] ;
95100 if ( ! eventNameSymbol ) {
96101 eventNameSymbol = zoneSymbolEventNames [ event . type ] = zoneSymbol ( 'ON_PROPERTY' + event . type ) ;
97102 }
98- const target = this || event && event . target || _global ;
103+ const target = this || event . target || _global ;
99104 const listener = target [ eventNameSymbol ] ;
100105 let result = listener && listener . apply ( this , arguments ) ;
101106
You can’t perform that action at this time.
0 commit comments