Skip to content

Commit

Permalink
Ensuring accurate stickyBottom when in RELEASE mode in case of height…
Browse files Browse the repository at this point in the history
… change
  • Loading branch information
src-code committed May 27, 2016
1 parent 146e953 commit 1d6a7a4
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/Sticky.jsx
Expand Up @@ -247,6 +247,7 @@ class Sticky extends Component {
// If "top" and "bottom" are inbetween stickyTop and stickyBottom, then Sticky is in
// RELEASE status. Otherwise, it changes to FIXED status, and its bottom sticks to
// viewport bottom when scrolling down, or its top sticks to viewport top when scrolling up.
self.stickyBottom = self.stickyTop + self.state.height;
if (delta > 0 && bottom > self.stickyBottom) {
self.fix(self.state.bottom - self.state.height);
} else if (delta < 0 && top < self.stickyTop) {
Expand Down

0 comments on commit 1d6a7a4

Please sign in to comment.