Skip to content

Commit

Permalink
Fixed a header calculation bug on Chrome 41.
Browse files Browse the repository at this point in the history
  • Loading branch information
RobertoGonzalez committed Mar 6, 2015
1 parent ef25b84 commit 03dfe2e
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 3 deletions.
4 changes: 3 additions & 1 deletion midnight.jquery.js
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,9 @@
// Disable the fixed height and trigger a reflow to get the proper height
// Get the inner height or just the height of the container
if( $inner.length ) {
$inner.css('bottom', 'auto');
// Overflow: Auto fixes an issue with Chrome 41, where outerHeight() no longer takes into account
// the margins of internal elements, creating a smaller container than necessary
$inner.css('bottom', 'auto').css('overflow', 'auto');
height = $inner.outerHeight();
$inner.css('bottom', '0');
} else {
Expand Down
Loading

0 comments on commit 03dfe2e

Please sign in to comment.