Skip to content

Commit

Permalink
fixed resize bug
Browse files Browse the repository at this point in the history
  • Loading branch information
Malte W committed Aug 7, 2015
1 parent 456c1e5 commit 6a275b8
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions src/Scrollbars.js
Original file line number Diff line number Diff line change
Expand Up @@ -165,8 +165,8 @@ export default class Scrollbars extends Component {
getSize() {
const $el = findDOMNode(this);
return {
width: $el.offsetWidth + SCROLLBAR_WIDTH,
height: $el.offsetHeight + SCROLLBAR_WIDTH
width: $el.offsetWidth + SCROLLBAR_WIDTH + 1,
height: $el.offsetHeight + SCROLLBAR_WIDTH + 1
};
}

Expand Down Expand Up @@ -259,7 +259,8 @@ export default class Scrollbars extends Component {
}

handleWindowResize() {
this.update();
const { width, height } = this.getSize();
this.setState({ width, height }, this.update);
}

dragStart(event) {
Expand Down

0 comments on commit 6a275b8

Please sign in to comment.