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

Clear duration with a timeout

Oliver Güntheracd3682bd99e
diff --git a/frontend/src/app/shared/components/datepicker/multi-date-modal/multi-date.modal.ts b/frontend/src/app/shared/components/datepicker/multi-date-modal/multi-date.modal.ts
index 46b05fd52c3..de947cd6521 100644
--- a/frontend/src/app/shared/components/datepicker/multi-date-modal/multi-date.modal.ts
+++ b/frontend/src/app/shared/components/datepicker/multi-date-modal/multi-date.modal.ts
@@ -398,6 +398,12 @@ export class MultiDateModalComponent extends OpModalComponent implements AfterVi
}
handleDurationFocusOut():void {
+ // Apply changed duration with a timeout
+ // in case we clicked the clear button
+ setTimeout(() => this.applyChangedDuration(), 25);
+ }
+
+ applyChangedDuration():void {
// If we cleared duration or left it empty
// reset the value and the due date
if (!this.duration) {