Skip to content

Commit

Permalink
Merge pull request #32 from rohanorton/master
Browse files Browse the repository at this point in the history
Fix no scrolling issue
  • Loading branch information
souhe committed Mar 11, 2016
2 parents e09593d + 4de27a9 commit 1292ec1
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/js/ScrollArea.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -246,7 +246,8 @@ export default class ScrollArea extends React.Component{

let newState = this.composeNewState(-deltaX, -deltaY);

if(this.state.topPosition !== newState.topPosition || this.state.leftPosition !== newState.leftPosition){
if((newState.topPosition && this.state.topPosition !== newState.topPosition) ||
(newState.leftPosition && this.state.leftPosition !== newState.leftPosition)) {
e.preventDefault();
}

Expand Down

0 comments on commit 1292ec1

Please sign in to comment.