You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
zone.js: patched addEventListener drops options exposed as accessors or non-enumerable properties #70431
Which @angular/* package(s) are the source of the bug?
zone.js
Is this a regression?
Yes. Introduced in zone.js 0.14.7 (June 2024) by #55796 / 85c1719. Bisected: 0.13.3, 0.14.0, 0.14.4, 0.14.6 all behave correctly; 0.14.7 → 0.16.2 do not.
Description
copyEventListenerOptions in packages/zone.js/lib/common/events.ts copies the caller's options object with {...options} before forwarding it to native addEventListener. Object spread copies only own enumerable data properties. The native call, by contrast, reads dictionary members via WebIDL — a plain [[Get]] per member, which honours accessors and ignores enumerability. The copy is therefore lossy in a way the native call is not.
signal was already special-cased after it broke WalletConnect (see #54142). passive, capture, and once were not, and are silently dropped in the same circumstances.
Please provide the environment you discovered this bug in (run `ng version`)
Reproduced against published zone.js 0.13.3 → 0.16.2 in headless Chromium.
Anything else?
The copy itself was the correct fix for #54142 (frozen/readonly options). The defect is that the copy is lossy, not that it exists — reverting to mutation would re-introduce #54142.
A fix is ready and will be sent as a PR that references this issue.
Activity
fix(zone.js): preserve accessor and non-enumerable event listener opt…
fix(zone.js): preserve accessor and non-enumerable event listener opt…
fix(zone.js): preserve accessor and non-enumerable event listener opt…
fix(zone.js): preserve accessor and non-enumerable event listener opt…
fix(zone.js): preserve accessor and non-enumerable event listener opt…
angular-automatic-lock-bot commentedon Oct 23, 2026
This issue has been automatically locked due to inactivity.
Please file a new issue if you are encountering a similar or related problem.
Read more about our automatic conversation locking policy.
This action has been performed automatically by a bot.