mirror of
https://git.joinsharkey.org/Sharkey/Sharkey.git
synced 2024-11-09 03:43:08 +02:00
fix(clinet): 誤字によりスクロールイベントリスナが解除されていなかったのを修正
This commit is contained in:
parent
0ace009a54
commit
c54d5e7040
1 changed files with 2 additions and 2 deletions
|
@ -20,7 +20,7 @@ export function onScrollTop(el: Element, cb) {
|
||||||
const pos = getScrollPosition(el);
|
const pos = getScrollPosition(el);
|
||||||
if (pos === 0) {
|
if (pos === 0) {
|
||||||
cb();
|
cb();
|
||||||
container.removeEventListener('scroll', onscroll);
|
container.removeEventListener('scroll', onScroll);
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
container.addEventListener('scroll', onScroll, { passive: true });
|
container.addEventListener('scroll', onScroll, { passive: true });
|
||||||
|
@ -33,7 +33,7 @@ export function onScrollBottom(el: Element, cb) {
|
||||||
const pos = getScrollPosition(el);
|
const pos = getScrollPosition(el);
|
||||||
if (pos + el.clientHeight > el.scrollHeight - 1) {
|
if (pos + el.clientHeight > el.scrollHeight - 1) {
|
||||||
cb();
|
cb();
|
||||||
container.removeEventListener('scroll', onscroll);
|
container.removeEventListener('scroll', onScroll);
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
container.addEventListener('scroll', onScroll, { passive: true });
|
container.addEventListener('scroll', onScroll, { passive: true });
|
||||||
|
|
Loading…
Reference in a new issue