Fix bug horizontal scrollbar being pushed off page

We weren’t calculating the height quite right; we were trying to
compensate for something that should have been compensated for in the
`stick-at-top-when-scrolling` code.

Add the 5px to the shim there is required because we’re adding it to the
element that the shim in replacing.
This commit is contained in:
Chris Hill-Scott
2017-12-20 15:37:34 +00:00
parent 86ab2bbe1b
commit aa22568c64
2 changed files with 2 additions and 1 deletions

View File

@@ -62,7 +62,7 @@
this.maintainHeight = () => {
let height = Math.min(
$(window).height() - this.topOffset + $('html, body').scrollTop() + 5,
$(window).height() - this.topOffset + $('html, body').scrollTop(),
this.nativeHeight
);

View File

@@ -53,4 +53,5 @@
.shim {
display: block;
margin-bottom: 5px;
}