1
0
mirror of https://github.com/misskey-dev/misskey.git synced 2026-05-14 09:55:38 +02:00
This commit is contained in:
tamaina
2023-07-11 12:36:45 +00:00
parent 9f246e3dc7
commit 5f1cd1e532
2 changed files with 21 additions and 13 deletions

View File

@@ -25,7 +25,7 @@ export function getScrollPosition(el: HTMLElement | null): number {
export function onScrollTop(el: HTMLElement, cb: () => unknown, tolerance = 1, once = false) {
// とりあえず評価してみる
if (isTopVisible(el)) {
if (isTopVisible(el, tolerance)) {
cb();
if (once) return null;
}