MutationObserver stops working when used in a project where @angular/upgrade is used

This issue has been tracked since 2022-09-22.

Which @angular/* package(s) are the source of the bug?

upgrade, zone.js

Is this a regression?



We are currently upgrading a project from angularjs to angular 14 and noticed that our callbacks from a MutationObserver are never where called.

If I create a new angular 14 project the callbacks work as intended, but as soon as I added @angular/upgrade they stopped working.

Please provide a link to a minimal reproduction of the bug

Please provide the exception or error you saw

The callback defined in src\app\app.component.ts:27 is never called

Please provide the environment you discovered this bug in (run ng version)

Angular CLI: 14.1.3
Node: 18.1.0 (Unsupported)
Package Manager: npm 8.19.2
OS: win32 x64

Angular: 14.2.3
... animations, common, compiler, compiler-cli, core, forms
... platform-browser, platform-browser-dynamic, router, upgrade

Package                         Version
@angular-devkit/architect       0.1402.3
@angular-devkit/build-angular   14.2.3
@angular-devkit/core            14.2.3
@angular-devkit/schematics      14.1.3
@angular/cli                    14.1.3
@schematics/angular             14.1.3
rxjs                            7.5.6
typescript                      4.7.4
AngularJS                       1.8.2

Anything else?

No response

JiaLiPassion wrote this answer on 2022-09-23

@AnderssonPeter , could you show a detailed reproduce steps? I cloned your repo, and clicked the toggle button, the mutation text is output correctly.

AnderssonPeter wrote this answer on 2022-09-23

@JiaLiPassion Seems your right, I was 100% sure I had the issue in that project but now it works as intended again.
I have tested with 3 different versions of chromium and it works as intended in all 3, but I'm 100% sure I had this issue yesterday..

More Details About Repo
Owner Name angular
Repo Name angular
Full Name angular/angular
Language TypeScript
Created Date 2014-09-18
Updated Date 2022-10-05
Star Count 84152
Watcher Count 3063
Fork Count 22247
Issue Count 1203


Issue Title Created Date Updated Date