From 1ddfd65a1e6ce842c5ba31a3963a6cb2240b09ae Mon Sep 17 00:00:00 2001 From: Sebastian Date: Mon, 23 May 2022 15:59:04 +0200 Subject: [PATCH] Do not update rich-editor on save. --- .../app/shared/components/forms/rich-editor.component.ts | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/frontend/src/app/shared/components/forms/rich-editor.component.ts b/frontend/src/app/shared/components/forms/rich-editor.component.ts index c3921ba3b..20e379789 100644 --- a/frontend/src/app/shared/components/forms/rich-editor.component.ts +++ b/frontend/src/app/shared/components/forms/rich-editor.component.ts @@ -228,7 +228,13 @@ export class RichEditorComponent extends StatefulControlComponent<{}, string> im } public writeValue(obj: any) { - this.value = Types.isString(obj) ? obj : ''; + const newValue = Types.isString(obj) ? obj : ''; + + if (newValue == this.value) { + return; + } + + this.value = newValue; if (this.tinyEditor && this.tinyEditor.initialized) { this.setContent();