fix(Calendar): rendering fails in some cases (#6812)
This commit is contained in:
@@ -40,7 +40,10 @@ export function getScroller(el: HTMLElement, root: ScrollElement = window) {
|
||||
}
|
||||
|
||||
export function getScrollTop(el: ScrollElement): number {
|
||||
return 'scrollTop' in el ? el.scrollTop : el.pageYOffset;
|
||||
const top = 'scrollTop' in el ? el.scrollTop : el.pageYOffset;
|
||||
|
||||
// iOS scroll bounce cause minus scrollTop
|
||||
return Math.max(top, 0);
|
||||
}
|
||||
|
||||
export function setScrollTop(el: ScrollElement, value: number) {
|
||||
|
||||
Reference in New Issue
Block a user