mirror of
https://github.com/ionic-team/ionic-framework.git
synced 2026-03-13 10:22:08 +08:00
fix(virtual-scroll): properly calculate top offset when nested (#21581)
This commit is contained in:
committed by
GitHub
parent
a625c837a6
commit
d297ecb87a
@@ -266,7 +266,7 @@ export class VirtualScroll implements ComponentInterface {
|
||||
let node: HTMLElement | null = el;
|
||||
while (node && node !== contentEl) {
|
||||
topOffset += node.offsetTop;
|
||||
node = node.parentElement;
|
||||
node = node.offsetParent as HTMLElement;
|
||||
}
|
||||
this.viewportOffset = topOffset;
|
||||
if (scrollEl) {
|
||||
|
||||
Reference in New Issue
Block a user