ADMX Guide

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

Category

Computer Configuration > Administrative Templates > Microsoft Edge

Scope

Both

Registry Key

HKLM\Software\Policies\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. When this policy is Enabled, the new (correct) behavior will be used. When this policy is Disabled, the old (legacy) behavior will be used. When this policy is left not set, the default behavior will be used. Note: This policy is a temporary workaround and will be removed in a future release. New and correct behavior: In `beforeunload`, calling `event.preventDefault()` will trigger the confirmation dialog. Setting `event.returnValue` to the empty string won’t trigger the confirmation dialog. Old and legacy behavior: In `beforeunload`, calling `event.preventDefault()` won’t trigger the confirmation dialog. Setting `event.returnValue` to the empty string will trigger the confirmation dialog.