Skip to content

Commit

Permalink
[fixed] correctly updates the window scroll position
Browse files Browse the repository at this point in the history
  • Loading branch information
mrydengren committed Jun 30, 2015
1 parent 3fe4d7d commit f4ed900
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 4 deletions.
4 changes: 1 addition & 3 deletions modules/ScrollManagementMixin.js
Original file line number Diff line number Diff line change
Expand Up @@ -61,9 +61,7 @@ var ScrollManagementMixin = {

if (locationState && this.props.shouldUpdateScrollPosition(this.state, prevState)) {
var { scrollX, scrollY } = locationState;

if (scrollX != null && scrollY != null)
this.props.updateScrollPosition(location.navigationType, scrollX, scrollY);
this.props.updateScrollPosition(location.navigationType, scrollX || 0, scrollY || 0);
}
}

Expand Down
2 changes: 1 addition & 1 deletion modules/__tests__/scrollManagement-test.js
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ describe('Scroll management', function () {

Inbox = React.createClass({
render() {
return <p>This is the inbox.</p>;
return <p style={{padding: '100px 3000px 3000px 100px'}}>This is the inbox.</p>;
}
});

Expand Down

0 comments on commit f4ed900

Please sign in to comment.