File tree Expand file tree Collapse file tree 1 file changed +3
-5
lines changed
packages/component-base/src Expand file tree Collapse file tree 1 file changed +3
-5
lines changed Original file line number Diff line number Diff line change @@ -547,8 +547,8 @@ export class IronListAdapter {
547
547
return ;
548
548
}
549
549
550
- this . _adjustVirtualIndexOffset ( this . _scrollTop - ( this . __previousScrollTop || 0 ) ) ;
551
- const delta = this . scrollTarget . scrollTop - this . _scrollPosition ;
550
+ this . _adjustVirtualIndexOffset ( this . _scrollTop - this . _scrollPosition ) ;
551
+ const delta = this . _scrollTop - this . _scrollPosition ;
552
552
553
553
super . _scrollHandler ( ) ;
554
554
@@ -601,11 +601,9 @@ export class IronListAdapter {
601
601
) ;
602
602
}
603
603
604
- this . __previousScrollTop = this . _scrollTop ;
605
-
606
604
// If the first visible index is not 0 when scrolled to the top,
607
605
// scroll to index 0 to fix the issue.
608
- if ( this . _scrollTop === 0 && this . firstVisibleIndex !== 0 && Math . abs ( delta ) > 0 ) {
606
+ if ( this . _scrollPosition === 0 && this . firstVisibleIndex !== 0 && Math . abs ( delta ) > 0 ) {
609
607
this . scrollToIndex ( 0 ) ;
610
608
}
611
609
}
You can’t perform that action at this time.
0 commit comments