Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

visual bug: flickering when over scrolling on ios #532

Closed
thurt opened this issue Jan 10, 2017 · 7 comments · Fixed by #566
Closed

visual bug: flickering when over scrolling on ios #532

thurt opened this issue Jan 10, 2017 · 7 comments · Fixed by #566

Comments

@thurt
Copy link

thurt commented Jan 10, 2017

using ios 9.2 device, go to https://bvaughn.github.io/react-virtualized/
pull down on the List so the first row goes lower (ie. this is an "over scroll" which can be done on ios)
i will see intermittent flicker/jumping of the list rendering for brief moment at the top of the overscroll. it should not render at the top of an overscroll.

this bug is not always apparent, if you do not see it first time, try overscrolling again or overscrolling faster.

i have tried adjusting overscan setting up and down, but I have not noticed any visible improvement.

@bvaughn
Copy link
Owner

bvaughn commented Jan 12, 2017

If you'd be willing to take a look at this and submit a PR- I'd be happy to review it. Realistically I won't have time to debug anything like this for a good while.

@jarbot
Copy link

jarbot commented Jan 24, 2017

I'm testing on ios - corodova w/ CDVWKWebViewEngine turned on. The overscroll flickers after releasing the over scroll, then my infinite list stops responding to scroll completely.

@johnhaley81
Copy link

Wonder if this is related to #453

@jarbot
Copy link

jarbot commented Jan 24, 2017

I was using a fixed positioned div to hold the infinite scroller. When I switch that to an absolutely positioned div I still see the flicker and momentary loss of the ability to scroll but then it recovers.

@rlebosse
Copy link

rlebosse commented Feb 2, 2017

I do have the same flicker on an iOS 10.2 device.

I noticed that if I have 10 000 items in the list, the flicker is pretty light but if I put 25 000 items in the list, the flicker is more obvious and annoying!

Anyone has an idea what it could come from? Maybe some items are re-rendered when overscrolling?

toddtarsi added a commit to toddtarsi/react-virtualized that referenced this issue Feb 7, 2017
If we're at a scrollTop above 0, just avoid triggering the scroll event entirely, or maybe I should pass the event through.
This is a McDonalds fix, feel free to critique this as needed. Thanks!
Resolves bvaughn#532
@toddtarsi
Copy link
Contributor

@rlebosse - You are exactly right.

Initially, I thought this was caused by an invalid scroll event.
What I am seeing, and I believe is the real triggering factor, is this upward scroll is triggering the call to onSectionRendered, due to the rowStopIndex and overscanRowStopIndex being modified. This triggers a redraw of the list elements, mangling the current scroll.

I've written a very basic fix here: #566

Basically, all it does is hook into the onScroll handler and prevent it from doing anything if we see the scroll is below 0, indicating we're playing with our scroll bounce. No flickers, but I also may have missed considering any other issues this may cause.

Thanks for the awesome repo!
Please review and let me know your thoughts. Thanks!

@bvaughn
Copy link
Owner

bvaughn commented Feb 14, 2017

@toddtarsi 's fix will go out with the upcoming RV9 release.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

6 participants