File tree 1 file changed +4
-2
lines changed
packages/component-base/src
1 file changed +4
-2
lines changed Original file line number Diff line number Diff line change @@ -55,8 +55,10 @@ export class IronListAdapter {
55
55
const attachObserver = new ResizeObserver ( ( [ { contentRect } ] ) => {
56
56
const isHidden = contentRect . width === 0 && contentRect . height === 0 ;
57
57
if ( ! isHidden && this . __scrollTargetHidden && this . scrollTarget . scrollTop !== this . _scrollPosition ) {
58
- // Adjust scroll position after moving the element within DOM
59
- // while also making it visible (e.g. inside of the dialog).
58
+ // When removing element from DOM, its scroll position is lost and
59
+ // virtualizer doesn't re-render when adding it to the DOM again.
60
+ // Restore scroll position when the scroll target becomes visible,
61
+ // which is the case e.g. when virtualizer is used inside a dialog.
60
62
this . scrollTarget . scrollTop = this . _scrollPosition ;
61
63
}
62
64
You can’t perform that action at this time.
0 commit comments