Closed henrysha closed 2 years ago
Haven't opened a separate issue.
scrollPos sometimes return number with .5 decimal. This causes isReachEnd to always return false even though scroll has reached the end position, since {element}.scrollWidth - {element}.scrollLeft returns offsetWidth + 0.5.
.5
isReachEnd
{element}.scrollWidth - {element}.scrollLeft
offsetWidth + 0.5
Closing PR since it seems the issue was happening elsewhere.
Issue
Haven't opened a separate issue.
Details
scrollPos sometimes return number with
.5
decimal. This causesisReachEnd
to always return false even though scroll has reached the end position, since{element}.scrollWidth - {element}.scrollLeft
returnsoffsetWidth + 0.5
.