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

Comments

@kuongknight
Copy link

commented Jan 5, 2018

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

This comment has been minimized.

Copy link

commented Jan 5, 2018

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

@kuongknight

This comment has been minimized.

Copy link
Author

commented Jan 5, 2018

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

@stereobooster

This comment has been minimized.

Copy link

commented Jan 5, 2018

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

This comment has been minimized.

Copy link
Author

commented Jan 5, 2018

We should make possible config beforeParse for jsdom.

@stereobooster

This comment has been minimized.

Copy link

commented Jan 13, 2018

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
Projects
None yet
2 participants
You can’t perform that action at this time.