Skip to content

Commit

Permalink
Merge pull request #116 from PowToon/master
Browse files Browse the repository at this point in the history
Fix scroll always appear on  IE
  • Loading branch information
malte-wessel authored Feb 10, 2017
2 parents d2c6f91 + b647379 commit 835a373
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/Scrollbars/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -172,7 +172,7 @@ export default createClass({
const { view, trackHorizontal } = this.refs;
const { scrollWidth, clientWidth } = view;
const trackWidth = getInnerWidth(trackHorizontal);
const width = clientWidth / scrollWidth * trackWidth;
const width = Math.ceil(clientWidth / scrollWidth * trackWidth);
if (trackWidth === width) return 0;
if (thumbSize) return thumbSize;
return Math.max(width, thumbMinSize);
Expand All @@ -183,7 +183,7 @@ export default createClass({
const { view, trackVertical } = this.refs;
const { scrollHeight, clientHeight } = view;
const trackHeight = getInnerHeight(trackVertical);
const height = clientHeight / scrollHeight * trackHeight;
const height = Math.ceil(clientHeight / scrollHeight * trackHeight);
if (trackHeight === height) return 0;
if (thumbSize) return thumbSize;
return Math.max(height, thumbMinSize);
Expand Down

0 comments on commit 835a373

Please sign in to comment.