Control the behavior for the cancel dialog produced by the beforeunload event (obsolete)
Jump to overview

Policy overview

Key metadata and intent for this policy.

Category
Microsoft Edge
Supported on
Microsoft Edge version 118-130, Windows 7 or later

Supported OS tags: Windows7

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.

Internal name
BeforeunloadEventCancelByPreventDefaultEnabled
Policy ID
ee46cbde3bb8
Elements
0

Registry values

How enabled and disabled states update the registry.

ScopeRegistry locationTypeEnabled valueDisabled valueCopy
Path
Software\Policies\Microsoft\Edge
Value name
BeforeunloadEventCancelByPreventDefaultEnabled
REG_DWORD
HKLM
1
HKCU
1
HKLM
0
HKCU
0
Registry location
Type REG_DWORD · Both
Path
Software\Policies\Microsoft\Edge
Value name
BeforeunloadEventCancelByPreventDefaultEnabled
Hive
HKLM
Enabled value
1
Disabled value
0
Hive
HKCU
Enabled value
1
Disabled value
0

Policy elements

Inputs and configuration options exposed by this policy.

This policy has no additional user input fields.