ADMX Viewer
Microsoft.Policies.Edge• Both

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

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.

Policy Details

Policy Name
BeforeunloadEventCancelByPreventDefaultEnabled
Registry Key
Software\Policies\Microsoft\Edge
Value Name
BeforeunloadEventCancelByPreventDefaultEnabled
Supported On
Microsoft Edge version 118-130, Windows 7 or later
Policy State Values
Enabled: 1
Disabled: 0
Available Languages
en-us