From a0303dd0033d4b518ed7bd47b2e3209907861168 Mon Sep 17 00:00:00 2001 From: nathan Date: Tue, 20 Sep 2022 16:54:20 -0600 Subject: [PATCH] Calendar: fix incorrect rendering when switching between single week & multi-week views egw.getHiddenDimensions() was incorrectly setting display based on title's current style --- calendar/js/et2_widget_event.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/calendar/js/et2_widget_event.ts b/calendar/js/et2_widget_event.ts index 057fcb90f5..7a9d15c2e8 100644 --- a/calendar/js/et2_widget_event.ts +++ b/calendar/js/et2_widget_event.ts @@ -436,10 +436,10 @@ export class et2_calendar_event extends et2_valueWidget implements et2_IDetached const line_height = parseFloat(this.div.css('line-height')); let visible_lines = Math.floor(this.div.innerHeight() / line_height); - if (!this.title.height()) + if(!this.title[0].clientHeight) { - // Handle sizing while hidden, such as when calendar is not the active tab - visible_lines = Math.floor(egw.getHiddenDimensions(this.div).h / egw.getHiddenDimensions(this.title).h); + // Handle sizing while hidden, such as when calendar is not the active tab + visible_lines = 1; } visible_lines = Math.max(1, visible_lines);