From bed91ce95a8d53022c008381e1069ba1e969361a Mon Sep 17 00:00:00 2001 From: Francis Lachapelle Date: Fri, 9 Apr 2021 17:57:08 -0400 Subject: [PATCH] fix(mail(js)): avoid updating the DOM before closing editor When destroying the CKEditor instance (closing the mail editor in HTML mode), we no longer try to update the associated textarea because we're removing it anyway. --- UI/WebServerResources/js/Common/sgCkeditor.component.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/UI/WebServerResources/js/Common/sgCkeditor.component.js b/UI/WebServerResources/js/Common/sgCkeditor.component.js index 2a1c92377..0b9ac3b03 100644 --- a/UI/WebServerResources/js/Common/sgCkeditor.component.js +++ b/UI/WebServerResources/js/Common/sgCkeditor.component.js @@ -319,8 +319,9 @@ } this.$onDestroy = function () { + var noUpdate = true; editorElement.classList.add('ng-cloak'); - editor.destroy(); + editor.destroy(noUpdate); } function onInstanceReady (event) {