From 49ac17f8e9efac85c8bf4e581153a9da469a0fb7 Mon Sep 17 00:00:00 2001 From: Johannes Eder Date: Thu, 12 Aug 2021 22:34:10 +0200 Subject: [PATCH] chore(model): moved destroyAll into close method --- frontend/src/utils/modal/modal.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/frontend/src/utils/modal/modal.js b/frontend/src/utils/modal/modal.js index f45770d10..8f013572f 100644 --- a/frontend/src/utils/modal/modal.js +++ b/frontend/src/utils/modal/modal.js @@ -137,7 +137,6 @@ export class Modal { _onCloseClicked = (event) => { event.preventDefault(); this._close(); - this._app.utilRegistry.destroyAll(this._element); } _onKeyUp = (event) => { @@ -165,6 +164,7 @@ export class Modal { this._modalsWrapper.classList.remove(MODALS_WRAPPER_OPEN_CLASS); document.removeEventListener('keyup', this._onKeyUp); + this._app.utilRegistry.destroyAll(this._element); }; _fillModal(url) {