Skip to content

Commit 2b4531c

Browse files
committed
Fixed bug: thumb was unable to reach the track end;
1 parent d74555e commit 2b4531c

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

dist/Scrollbar/index.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -562,8 +562,8 @@ var Scrollbar = function (_Component) {
562562
scrollHeight = scrollValues.scrollHeight;
563563

564564

565-
var verticalScrollPossible = scrollHeight >= clientHeight && !this.props.noScroll && this.props.scrollY,
566-
horizontalScrollPossible = scrollWidth >= clientWidth && !this.props.noScroll && this.props.scrollX;
565+
var verticalScrollPossible = scrollHeight > clientHeight && !this.props.noScroll && this.props.scrollY,
566+
horizontalScrollPossible = scrollWidth > clientWidth && !this.props.noScroll && this.props.scrollX;
567567

568568
var oldVerticalTrackDisplay = this.trackVertical.style.display,
569569
oldHorizontalTrackDisplay = this.trackHorizontal.style.display;

src/Scrollbar/index.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -535,8 +535,8 @@ export default class Scrollbar extends Component
535535
const scrollValues = this.getScrollValues();
536536
const {scrollLeft, scrollTop, clientWidth, scrollWidth, clientHeight, scrollHeight} = scrollValues;
537537

538-
const verticalScrollPossible = scrollHeight >= clientHeight && !this.props.noScroll && this.props.scrollY,
539-
horizontalScrollPossible = scrollWidth >= clientWidth && !this.props.noScroll && this.props.scrollX;
538+
const verticalScrollPossible = scrollHeight > clientHeight && !this.props.noScroll && this.props.scrollY,
539+
horizontalScrollPossible = scrollWidth > clientWidth && !this.props.noScroll && this.props.scrollX;
540540

541541
const oldVerticalTrackDisplay = this.trackVertical.style.display,
542542
oldHorizontalTrackDisplay = this.trackHorizontal.style.display;

0 commit comments

Comments
 (0)