Title: zone.js drains microtasks too early in synchronous event call · Issue #44446 · angular/angular · GitHub
Open Graph Title: zone.js drains microtasks too early in synchronous event call · Issue #44446 · angular/angular
X Title: zone.js drains microtasks too early in synchronous event call · Issue #44446 · angular/angular
Description: Which @angular/* package(s) are the source of the bug? Don't known / other Is this a regression? No Description Please see the reproduction. It seems zone.js assumes EventTarget's event call is always a standalone task, which may not be ...
Open Graph Description: Which @angular/* package(s) are the source of the bug? Don't known / other Is this a regression? No Description Please see the reproduction. It seems zone.js assumes EventTarget's event call is alw...
X Description: Which @angular/* package(s) are the source of the bug? Don't known / other Is this a regression? No Description Please see the reproduction. It seems zone.js assumes EventTarget's event cal...
Opengraph URL: https://github.com/angular/angular/issues/44446
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"zone.js drains microtasks too early in synchronous event call","articleBody":"### Which @angular/* package(s) are the source of the bug?\n\nDon't known / other\n\n### Is this a regression?\n\nNo\n\n### Description\n\nPlease see the reproduction. It seems zone.js assumes EventTarget's event call is always a standalone task, which may not be true.\r\n\r\n```js\r\nconst invoke = (fn) => {\r\n document.body.addEventListener('click', fn);\r\n document.body.click();\r\n document.body.removeEventListener('click', fn);\r\n};\r\n\r\ninvoke(() => {\r\n Promise.resolve().then(() => console.log(2));\r\n});\r\nconsole.log(1);\r\n```\n\n### Please provide a link to a minimal reproduction of the bug\n\nhttps://stackblitz.com/edit/typescript-88btqj?file=index.ts\n\n### Please provide the exception or error you saw\n\n```true\nNative Chrome/Safari/Firefox outputs `1 2`, while with zone.js outputs `2 1`.\n```\n\n\n### Please provide the environment you discovered this bug in (run `ng version`)\n\n_No response_\n\n### Anything else?\n\nI noticed this during debugging https://github.com/angular/angular/issues/41506#issuecomment-991765487 , maybe related.","author":{"url":"https://github.com/xiaody","@type":"Person","name":"xiaody"},"datePublished":"2021-12-11T20:27:19Z","url":"https://github.com/angular/angular/issues/44446"}
| react-profiling | 0 |
| react-import-map | react,react-dom,react-dom/client,react-dom/profiling,react-is,react/compiler-runtime,react/jsx-dev-runtime,react/jsx-runtime,scheduler@b8488ee2c322 |
| route-pattern | /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) |
| route-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:afa30691-93e1-7ce1-d5be-bd3f3706828c |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | BEC2:26ECEB:1D1245E:2500F67:6B014825 |
| html-safe-nonce | 2bf4ec26350e110fa4afca6195a17eb962d77f59784e3cfee725a5eca543bab5 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJCRUMyOjI2RUNFQjoxRDEyNDVFOjI1MDBGNjc6NkIwMTQ4MjUiLCJ2aXNpdG9yX2lkIjoiMTc5MTg2NDI3ODk5MTU4NzM2NSIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9 |
| visitor-hmac | 2af7b478281f0e1ebd0d557e0202b17ce09220b7293dfce43fb22a67c4fdd0ef |
| hovercard-subject-tag | issue:1077640996 |
| github-keyboard-shortcuts | repository,issues,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/angular/angular/44446/issue_layout |
| twitter:image | https://opengraph.githubassets.com/d2bedd37b4dbd9342dd468a85474f2ac640371e906e5baab4a589e0ba2e0b4ca/angular/angular/issues/44446 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/d2bedd37b4dbd9342dd468a85474f2ac640371e906e5baab4a589e0ba2e0b4ca/angular/angular/issues/44446 |
| og:image:alt | Which @angular/* package(s) are the source of the bug? Don't known / other Is this a regression? No Description Please see the reproduction. It seems zone.js assumes EventTarget's event call is alw... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | xiaody |
| hostname | github.com |
| expected-hostname | github.com |
| None | cc5dfdd32f62ebd3223cab3af3aa2b268d3605218237326a48a99d1efd89495c |
| turbo-cache-control | no-preview |
| go-import | github.com/angular/angular git https://github.com/angular/angular.git |
| octolytics-dimension-user_id | 139426 |
| octolytics-dimension-user_login | angular |
| octolytics-dimension-repository_id | 24195339 |
| octolytics-dimension-repository_nwo | angular/angular |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 24195339 |
| octolytics-dimension-repository_network_root_nwo | angular/angular |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 8c77c9e8439031ad54c75a250694842892f693e1 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
| react-app-name | issues |
Links:
Viewport: width=device-width