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 b6bc40d commit c1cf22eCopy full SHA for c1cf22e
src/scrollToTop.ts
@@ -6,7 +6,7 @@ export function scrollToTop() {
6
const t = document.documentElement.scrollTop || document.body.scrollTop
7
if (pre === undefined)
8
pre = t
9
- if (pre < t || t === 0)
+ if (pre + 5 < t || t === 0)
10
stop()
11
window.scrollTo(0, pre = t - t / 8)
12
}, 0)
0 commit comments