diff --git a/src/common/View.js b/src/common/View.js index ec0ddd2..aeb1e2f 100644 --- a/src/common/View.js +++ b/src/common/View.js @@ -121,8 +121,17 @@ View.prototype = { // Given the total height of the view, return the number of pixels that should be used for the scroller. // Utility for subclasses. computeScrollerHeight: function(totalHeight) { - // `otherHeight` is the cumulative height of everything that is not the scrollerEl in the view (header+borders) - var otherHeight = this.el.outerHeight() - this.scrollerEl.height(); + var both = this.el.add(this.scrollerEl); + var otherHeight; // cumulative height of everything that is not the scrollerEl in the view (header+borders) + + // fuckin IE8/9/10/11 sometimes returns 0 for dimensions. this weird hack was the only thing that worked + both.css({ + position: 'relative', // cause a reflow, which will force fresh dimension recalculation + left: -1 // ensure reflow in case the el was already relative. negative is less likely to cause new scroll + }); + otherHeight = this.el.outerHeight() - this.scrollerEl.height(); // grab the dimensions + both.css({ position: '', left: '' }); // undo hack + return totalHeight - otherHeight; }, diff --git a/src/main.css b/src/main.css index 51ee6b4..39ce4a5 100644 --- a/src/main.css +++ b/src/main.css @@ -64,7 +64,7 @@ /* View Structure --------------------------------------------------------------------------------------------------*/ -.fc-view-container, /* scope positioning and z-index's for everything within the view */ +.fc-view, /* scope positioning and z-index's for everything within the view */ .fc-view > table { /* so dragged elements can be above the view's main element */ position: relative; z-index: 1;