Confirmation dialog memory leak, not destroying on hide

Fixed in

EPiServer.CMS.UI 10.0.2

Created

Feb 01, 2016

Updated

Oct 27, 2016

Area

CMS UI

State

Closed, Fixed and tested


Description

An old fix in _dialogBase and Dialog, which caused the alert and withConfirmation dialogs to destroy when hidden, became undone, at least with the Confirmation.js dialogs. Because they were made to inherit from Dialog instead of _baseDialog to add keyboard support.

The solution is to set destroyOnHide: true on Confirmation.js, which is a semantic breaking change. This has been solved in withConfirmation CMS-2702 in order to avoid the breaking change, but should really be defined in the parent class.

Breaking change
Set destroyOnHide to false to keep the dialog around after it’s hidden. Otherwise, there’s no need to set the value, as we want to destroy dialogs by default to avoid memory leaks.