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

Breaks accelerated scrolling #2

Open
bessey opened this issue Mar 1, 2015 · 7 comments
Open

Breaks accelerated scrolling #2

bessey opened this issue Mar 1, 2015 · 7 comments

Comments

@bessey
Copy link

bessey commented Mar 1, 2015

(Great library by the way ❤️)

I notice accelerated scrolling comes to an abrupt halt when the user scrolls at speed. I suspect this is because there isn't a large enough buffer of future nodes in the DOM.

@bessey
Copy link
Author

bessey commented Mar 1, 2015

Perhaps if the number of nodes was configurable this would address the problem.

@jkimbo
Copy link
Contributor

jkimbo commented Mar 1, 2015

Good point! Never came across this problem when testing it but it definitely makes sense to make it configurable.

@jkimbo jkimbo closed this as completed in 5a2792b Mar 1, 2015
@jkimbo
Copy link
Contributor

jkimbo commented Mar 1, 2015

itemPadding property is now available on v0.2.0

@bessey
Copy link
Author

bessey commented Mar 1, 2015

Thank you! I've updated but I'm still facing the same problem.. Took some more time to debug this time.

It seems in Firefox, things are buttery smooth (actually reducing itemPadding to 1 makes things even smoother!). Increasing padding, even to a mammoth amount, has no effect on Chrome or Safari. Within maybe 100ms of me releasing my fingers from the trackpad, the lazy render scrollbar stops hard, and the outer container is pulled down.

Its not a dealbreaker for me anyway, and i must say it feels absolutely fantastic in FF. I wonder why webkit doesnt like it so much... I don't have much experience debugging these things so I'm going to leave it for now

@jkimbo
Copy link
Contributor

jkimbo commented Mar 2, 2015

Hmm interesting. What operating system are you on btw? Also is the same thing happening on the demo page for you (http://onefinestay.github.io/react-lazy-render/)?

@jkimbo jkimbo reopened this Mar 2, 2015
@bessey
Copy link
Author

bessey commented Mar 3, 2015

OS X, but it doesn't happen with the demo, so I'm gonna assume its my
fault. Will continue to investigate

On Mon, 2 Mar 2015 at 06:40 Jonathan Kim [email protected] wrote:

Hmm interesting. What operating system are you on btw? Also is the same
thing happening on the demo page for you (
http://onefinestay.github.io/react-lazy-render/)?


Reply to this email directly or view it on GitHub
#2 (comment)
.

@jkimbo
Copy link
Contributor

jkimbo commented Mar 3, 2015

Ah so are you setting a key on your children? I've noticed this problem before where if I set a key then it halts the browser scrolling. What I imagine is going on is that since the keys are different React replaces the whole div rather than just replacing the contents of it and that halts scrolling in Chrome. For the demo I don't set any keys since it's not strictly necessary.

jkimbo pushed a commit that referenced this issue Jul 1, 2015
FIXED JITTER. must set child height state if children changed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants