fix(client): Fix #6532
This commit is contained in:
@@ -25,3 +25,12 @@ export function onScrollTop(el: Element, cb) {
|
||||
};
|
||||
container.addEventListener('scroll', onScroll, { passive: true });
|
||||
}
|
||||
|
||||
export function scroll(el: Element, top: number) {
|
||||
const container = getScrollContainer(el);
|
||||
if (container == null) {
|
||||
window.scroll({ top: top, behavior: 'instant' });
|
||||
} else {
|
||||
container.scrollTop = top;
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user