Skip to content

Commit

Permalink
Merge pull request #32 from yahoo/releasetofixed
Browse files Browse the repository at this point in the history
fixed Sticky not being fixed when calling window.scrollTo()
  • Loading branch information
kaesonho committed Apr 20, 2016
2 parents ff4a48d + 6265485 commit 12dc169
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/Sticky.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -222,7 +222,9 @@ class Sticky extends Component {
self.release(self.state.y);
self.stickyTop = self.state.y;
self.stickyBottom = self.stickyTop + self.state.height;
break;
// Commentting out "break" is on purpose, because there is a chance to transit to FIXED
// from ORIGINAL when calling window.scrollTo().
// break;
case STATUS_RELEASED:
// 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
Expand Down

0 comments on commit 12dc169

Please sign in to comment.