Toolkit: set clearPropertiesOnDestroy to false by default

instead of the upstream default of 'async'

we do this since it creates some problems with our callbacks which can
happen during component destruction. The upstream reasoning does not
really makes sense for us normally, since we do not keep any references
around for most things, and thus the garbage collector can claim it.

note that this is only for components, Ext.Base sets it to 'true' by
default and we do not change this since we normally do not extend
from non-components

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
This commit is contained in:
Dominik Csapak 2021-05-26 10:58:31 +02:00 committed by Thomas Lamprecht
parent 518dd0b6d9
commit 322de5629f

View File

@ -662,6 +662,12 @@ Ext.define('Proxmox.selection.CheckboxModel', {
// override the download server url globally, for privacy reasons
Ext.draw.Container.prototype.defaultDownloadServerUrl = "-";
// stop nulling of properties
Ext.define('Proxmox.Component', {
override: 'Ext.Component',
clearPropertiesOnDestroy: false,
});
// force alert boxes to be rendered with an Error Icon
// since Ext.Msg is an object and not a prototype, we need to override it
// after the framework has been initiated