Skip to content

Conversation

@MarkFalconbridge
Copy link
Contributor

Fixes #257

Prevents toggling between the calculated minOffset and maxOffset when minOffset is greater than maxOffset owing to the scrollbar size.

if (scrollLeft >= minOffset && scrollLeft <= maxOffset) {
return scrollLeft;
} else if (minOffset > maxOffset) {
return minOffset;
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this needs an explanatory comment, because it looks like a bug at first glance 😄

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fair point! Now added.

Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks like you added other places but missed this one 😆

Copy link
Owner

@bvaughn bvaughn left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

if (scrollLeft >= minOffset && scrollLeft <= maxOffset) {
return scrollLeft;
} else if (minOffset > maxOffset) {
return minOffset;
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks like you added other places but missed this one 😆

@bvaughn bvaughn merged commit c035eee into bvaughn:master Jun 18, 2019
@bvaughn
Copy link
Owner

bvaughn commented Jun 18, 2019

Published in 1.8.3

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

2 participants