googlearchive / core-list

Polymer virtualized list element
25 stars 20 forks source link

ScrollToItem near end of list doesn't display higher items #49

Closed Ortham closed 7 years ago

Ortham commented 10 years ago

What seems to be happening is that the virtual item you choose to scroll to is rendered as the first real item. This is fine if you've got at least one view height away from the bottom of the list, but within one view height from the bottom, the selected item can't appear at the top of the page, and since it's the first real item, nothing appears above it.

I'm not sure I've explained it well, but I can replicate it on the <core-list> demo page: just enter the following into your console:

document.body.firstElementChild.shadowRoot.getElementById('list').scrollToItem(50000);
kevinpschaaf commented 9 years ago

I can repro this issue. Also manifests in new demo-splitter.html when resizing at the end of a list. Issue is related to flipBounds being calculated as a percentage of the height of the rendered physical items, which is uniquely small when doing random access to the end of the list.

Ortham commented 7 years ago

Closing this as it's obsolete.