mirror of
https://github.com/wassname/fullcalendar.git
synced 2026-08-18 12:00:36 +08:00
fix IE bug where fixed height of view would oscillate
This commit is contained in:
+11
-2
@@ -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;
|
||||
},
|
||||
|
||||
|
||||
+1
-1
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user