Skip to content
This repository has been archived by the owner on Feb 26, 2024. It is now read-only.

fix(core): handle hybrid Event.prototype.stopImmediatePropagation #956

Merged
merged 1 commit into from
Dec 27, 2017
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
fix(core): handle hybrid Event.prototype.stopImmediatePropagation
  • Loading branch information
JiaLiPassion committed Nov 16, 2017
commit dcbffb661212340c4dd882d2b07619ac144fffee
4 changes: 4 additions & 0 deletions lib/common/events.ts
Original file line number Diff line number Diff line change
Expand Up @@ -595,6 +595,10 @@ export function patchEventPrototype(global: any, api: _ZonePrivate) {
Event.prototype, 'stopImmediatePropagation',
(delegate: Function) => function(self: any, args: any[]) {
self[IMMEDIATE_PROPAGATION_SYMBOL] = true;
// we need to call the native stopImmediatePropagation
// in case in some hybrid application, some part of
// application will be controlled by zone, some are not
delegate && delegate.apply(self, args);
});
}
}