scrollSnapPointsPolyfill icon indicating copy to clipboard operation
scrollSnapPointsPolyfill copied to clipboard

Flickering when slightly overscrolling

Open ckrack opened this issue 10 years ago • 1 comments

When i scroll slightly over a snap-point, this polyfill will go with the scroll, displaying the a part of the content that is further than the next snap-point and then snap back to the closest snap-point.

For example, i scroll down 2 1/4 elements. I then see the 3rd element. The scroll-snap is at the beginning of the 2nd element though. The polyfill thus is moving back there, but does so with a flickering. It goes back too far, then comes to a rest at the right position.

In Safari it appears to always go down to the next snap-point in the direction of scrolling. This prevents the flickering and is a more natural feel.

Browser: Chrome 46, but it's a general issue

ckrack avatar Nov 02 '15 09:11 ckrack

I have fixed this and other issues in ckrack/scrollsnap-polyfill. I'm using a different approach there, which parses CSS values, supports more of the spec and includes smooth scrolling.

ckrack avatar Dec 10 '15 09:12 ckrack