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

Scroll flicker #90

Closed
kybarg opened this issue Feb 8, 2017 · 5 comments
Closed

Scroll flicker #90

kybarg opened this issue Feb 8, 2017 · 5 comments
Labels

Comments

@kybarg
Copy link
Collaborator

kybarg commented Feb 8, 2017

Cant get page no to flicker after SSR. Styles are in place but scroll glitches.

@diegohaz
Copy link
Owner

Hey, @kybarg. Is this still happening? I can't see the same behavior, can you provide some steps to reproduce it, a GIF or something else?

@kybarg
Copy link
Collaborator Author

kybarg commented Feb 10, 2017

@diegohaz Sure, Please pay attention to scrollbar behavior. And I think this just happens when server-side rendering is enabled. Cause your website seems to work fine.
video example

@diegohaz
Copy link
Owner

Oh, I see now. Thank you for the video, it helped a lot.

I did a quick test here and it seems to be caused by react-router-scroll. Removing it completely from src/client.js (universal-redux) or src/index.js (master/redux) solved this problem for me. Can you try it? If it works for you, please send a PR against the master branch. :)

We would need to get rid of it anyway because react-router-scroll will not be supported by react-router v4

@diegohaz diegohaz added the bug label Feb 11, 2017
@diegohaz
Copy link
Owner

Reference on react-router-scroll README: https://github.com/taion/react-router-scroll#server-rendering

The weird part is that it also has no effect on client (at least on Chrome). It seems to be useless unless we use a custom scroll behavior.

@kybarg
Copy link
Collaborator Author

kybarg commented Feb 11, 2017

@diegohaz Definitely that was it!) Thank you so much.

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

No branches or pull requests

2 participants