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

Error: Not implemented: window.scrollTo, #93

Closed
kuongknight opened this issue Jan 5, 2018 · 5 comments
Closed

Error: Not implemented: window.scrollTo, #93

kuongknight opened this issue Jan 5, 2018 · 5 comments

Comments

@kuongknight
Copy link

I found error "Error: Not implemented: window.scrollTo", I fixed it by custom react-snapshot
Then it is working, but react-snapshot render same with all page (without react render, only html with script tags)

@stereobooster
Copy link

Can you provide more clear description of the issue and reproducible example?

@kuongknight
Copy link
Author

kuongknight commented Jan 5, 2018

Try add componentWillMount() { window.scrollTo(0, 0) } to App.js and build (create-react-app)

@stereobooster
Copy link

If you are reporting about not implemented scrollTo. Yes this is known issue, because react-snapshot using jsdom which implements only subset of browser APIs. You can file an issue against jsdom as well.

From readme:

Is JSDOM gonna hold us back at some point?

Related #40

@kuongknight
Copy link
Author

We should make possible config beforeParse for jsdom.

@stereobooster
Copy link

Jsdom issue won't be fixed, see #44 (comment). If this answers your question please close issue. Thanks

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