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

Fix calendar rendering when wrapper is still hidden

Oliver Günther137ad35e77a7
diff --git a/frontend/src/stimulus/controllers/dynamic/my/time-tracking.controller.ts b/frontend/src/stimulus/controllers/dynamic/my/time-tracking.controller.ts
index 8afe6574746..e51934f31b1 100644
--- a/frontend/src/stimulus/controllers/dynamic/my/time-tracking.controller.ts
+++ b/frontend/src/stimulus/controllers/dynamic/my/time-tracking.controller.ts
@@ -64,6 +64,10 @@ export default class MyTimeTrackingController extends Controller {
if (this.hasCalendarTarget && this.viewModeValue === 'calendar') {
this.initializeCalendar();
+
+ // The stimulus controller gets initialized before the content wrapper is fully shown
+ // so its height might not be set correctly yet.
+ setTimeout(() => this.calendar.updateSize(), 25);
}
// handle dialog close event