Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

arturovt
Copy link
Contributor

@arturovt arturovt commented May 19, 2024

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

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 angular#47579
@arturovt arturovt marked this pull request as ready for review May 19, 2024 15:29
@pullapprove pullapprove bot requested a review from JiaLiPassion May 19, 2024 15:29
@ngbot ngbot bot added this to the Backlog milestone May 22, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
2 participants