Skip to content

OpenProject is the leading open source project management software for product, project and portfolio management. A powerful Jira alternative with agile planning, issue tracking, roadmaps, Gantt charts, time tracking, collaboration features, and more. Available on premises or in the cloud. ⭐ Star us on GitHub

Protect against possible race conditions `CkEditorAugmentedTextareaComponent.saveForm`

Kabiru Mwenja618e7bac32f5
diff --git a/frontend/src/app/shared/components/editor/components/ckeditor-augmented-textarea/ckeditor-augmented-textarea.component.ts b/frontend/src/app/shared/components/editor/components/ckeditor-augmented-textarea/ckeditor-augmented-textarea.component.ts
index db634da41d3..06ef92b91bb 100644
--- a/frontend/src/app/shared/components/editor/components/ckeditor-augmented-textarea/ckeditor-augmented-textarea.component.ts
+++ b/frontend/src/app/shared/components/editor/components/ckeditor-augmented-textarea/ckeditor-augmented-textarea.component.ts
@@ -184,6 +184,10 @@ export class CkeditorAugmentedTextareaComponent extends UntilDestroyedMixin impl
}
public async saveForm(evt?:SubmitEvent):Promise<void> {
+ if (CkeditorAugmentedTextareaComponent.inFlight.get(this.formElement)) {
+ return;
+ }
+
CkeditorAugmentedTextareaComponent.inFlight.set(this.formElement, true);
this.syncToTextarea();