angular icon indicating copy to clipboard operation
angular copied to clipboard

fix(zone.js): allow enabling default `beforeunload` handling

Open arturovt opened this issue 1 month ago • 0 comments

Prior to this commit, when zone.js was included, it wasn't possible to handle beforeunload events correctly if event handlers returned strings to prompt the user.

With this change, we introduce a global configuration flag, __zone_symbol__enable_beforeunload, to allow consumers to enable the default beforeunload handling behavior.

This flag is necessary to prevent any breaking changes resulting from this modification. The previous attempt to fix it caused a large number of failures in G3. Hence, we're hiding that fix behind the configuration flag.

Closes #47579 Closes #52256

arturovt avatar May 19 '24 15:05 arturovt