mirror of
https://github.com/ionic-team/ionic-framework.git
synced 2025-08-19 03:32:21 +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