We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 43bac62 commit 2439b59Copy full SHA for 2439b59
src/index.ts
@@ -81,8 +81,9 @@ function smoothScroll(
81
startY = el.scrollTop
82
method = (x: number, y: number) => {
83
// @TODO use Element.scroll if it exists, as it is potentially better performing
84
- el.scrollLeft = x
85
- el.scrollTop = y
+ // use ceil to include the the fractional part of the number for the scrolling
+ el.scrollLeft = Math.ceil(x)
86
+ el.scrollTop = Math.ceil(y)
87
}
88
89
// scroll looping over a frame if needed
0 commit comments