-
Notifications
You must be signed in to change notification settings - Fork 698
Open
Labels
bugFor tagging faulty or unexpected behavior.For tagging faulty or unexpected behavior.investigation-neededIndication that the maintainer or involved community members may need to investigate more.Indication that the maintainer or involved community members may need to investigate more.
Description
Describe the bug
When you have other parts of the application having iframes that are sending messages back to the parent window, silent refresh's event listener on message
is causing angular to trigger its change detection.
Stackblitz example
I can help setup if someone could point me to a seed stackblitz
To Reproduce
Steps to reproduce the behavior:
- Setup silent refresh
- Add something triggering window
message
event - add a
ngDoCheck
to any component or directive with a console.log - watch it light up.
Expected behavior
Should not have unnecessary change detect due to using silent refresh
Desktop (please complete the following information):
- OS: Windows
- Browser Chrome
- Version ^5.0.2
Additional context
I reckon this should fix it; but then again I'm not sure if there's any where else down the stream you'd need to run inside angular again.
this.ngZone.runOutsideAngular(() => {
window.addEventListener('message', this.silentRefreshPostMessageEventListener);
});
DDoerner, ghostlytalamaur, mjolka, LoaderB0T, zampage and 4 more
Metadata
Metadata
Assignees
Labels
bugFor tagging faulty or unexpected behavior.For tagging faulty or unexpected behavior.investigation-neededIndication that the maintainer or involved community members may need to investigate more.Indication that the maintainer or involved community members may need to investigate more.