Control the behavior for the cancel dialog produced by the beforeunload event (obsolete)
- Policy ID
- BeforeunloadEventCancelByPreventDefaultEnabled
- Scope
- Computer Configuration, User Configuration
- Supported on
- Microsoft Edge version 118-130, Windows 7 or later
- Source
- Microsoft Edge Policy Templates (version 155.0.4283.45)
- Category
- Microsoft Edge
Description
OBSOLETE: This policy is obsolete and doesn't work after Microsoft Edge 130.
This policy provides a temporary opt-out for two related fixes to the behavior of the confirmation dialog that’s shown by the beforeunload event.
If you've enabled this policy, the new (correct) behavior is used.
If you've disabled this policy, the old (legacy) behavior is used.
If you haven't configured this policy, the default behavior is used.
Note: This policy is a temporary workaround and is going to be removed in a future release.
New and correct behavior: In `beforeunload`, calling `event.preventDefault()` triggers the confirmation dialog. Setting `event.returnValue` to the empty string doesn’t trigger the confirmation dialog.
Old and legacy behavior: In `beforeunload`, calling `event.preventDefault()` doesn’t trigger the confirmation dialog. Setting `event.returnValue` to the empty string triggers the confirmation dialog.
Registry
- BeforeunloadEventCancelByPreventDefaultEnabledREG_DWORD
- BeforeunloadEventCancelByPreventDefaultEnabledREG_DWORD