kamilkp / angular-vs-repeat

Virtual Scroll for AngularJS ngRepeat directive
http://kamilkp.github.io/angular-vs-repeat/
MIT License
818 stars 228 forks source link

vs-repeat scrolls all the way to the bottom on Chrome 56.0.2924.87 #156

Closed rognstad closed 7 years ago

rognstad commented 7 years ago

Hi,

Chrome 56.0.2924.87 is now the stable version and is getting pushed to people.

I'm using vs-repeat to show a list of items in a fixed-height/scroll-y element. As of Chrome 56.0.2924.87, when a user scrolls the list beyond the excess value, the list continues scroll until it reaches the bottom or the user tries to scroll up.

Here's a plunk illustrating the issue: http://run.plnkr.co/plunks/iu0A9R/

This happens on both Mac and Windows with that version of Chrome. I can't replicate it in any other browser.

I'd appreciate any suggestions you have in terms of avoiding this behavior.

Thanks!

rognstad commented 7 years ago

Actually, it looks like this is because of scroll anchoring, which was added as an experiment in Chrome 51 and became default in 56. Adding "overflow-anchor: none;" to the parent works.

See: https://github.com/angular-ui/ui-scroll/issues/138#issuecomment-278989966

You might consider adding that property dynamically when vs-scroll-parent is used.

Smarello commented 7 years ago

Thanks for sharing, I had the same problem!

Shemesh commented 7 years ago

you can use css to overcome this issue:

[vs-repeat] {
  overflow-anchor: none;
}