From e4f6b60db94a8bd5199b08d8b1979b4ddfdb2aef Mon Sep 17 00:00:00 2001 From: Nathan Gray Date: Mon, 28 Dec 2015 16:25:53 +0000 Subject: [PATCH] Fix refresh while calendar tab is hidden caused events to be minimum height --- calendar/js/et2_widget_daycol.js | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/calendar/js/et2_widget_daycol.js b/calendar/js/et2_widget_daycol.js index 19253dff66..ba46fb2d21 100644 --- a/calendar/js/et2_widget_daycol.js +++ b/calendar/js/et2_widget_daycol.js @@ -718,8 +718,12 @@ var et2_calendar_daycol = et2_valueWidget.extend([et2_IDetachedDOM], { columns[c][i].div.css('top', top+'%'); columns[c][i].div.css('height', height+'%'); - // Remove spacing from border - var border_diff = columns[c][i].div.outerHeight() - columns[c][i].div.height(); + // Remove spacing from border, but only if visible or the height will be wrong + var border_diff = 0; + if(columns[c][i].div.is(':visible')) + { + border_diff = columns[c][i].div.outerHeight() - columns[c][i].div.height(); + } columns[c][i].div.css('height',columns[c][i].div.height() - border_diff); // This gives the wrong height //columns[c][i].div.outerHeight(height+'%');