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

Lose window.history.state after page refresh #557

Closed
vchibilisco-convey opened this issue Jan 5, 2018 · 3 comments
Closed

Lose window.history.state after page refresh #557

vchibilisco-convey opened this issue Jan 5, 2018 · 3 comments

Comments

@vchibilisco-convey
Copy link

vchibilisco-convey commented Jan 5, 2018

Hi.

I do not know if a problem in the history library or browser, but ...

I am working on Firefox Quantum 57.0.4 64 bit, and when I select the url and press enter, after updating the page I can not get the history.location.state. After investigating, I discovered that window.history.state is null.

Does anyone have this error?

@mjackson
Copy link
Member

We need more info in order to help you debug this. Can you show a small, reproducible test case?

@ImanMh
Copy link

ImanMh commented Mar 2, 2018

I have the same issue. It's very clear and I'm not sure this package can do anything about it. if you do this:

  history.push('/home', { some: 'state' })

when you go to home you have some === 'state' and if you refresh in chrome you get that state again which is stupid. In Firefox, things are different and a refresh is counted a fresh new start and you don't have that state which I think is much better. In chrome you have to close the tab and open a new one to get ride of that state.

@vchibilisco-convey
Copy link
Author

vchibilisco-convey commented Mar 2, 2018

@mjackson sorry my delay.
Yes, basically, when you set in the state, and refresh the page, it is lose the state value.
The example of @ImanMh is the correct scenery for reproduce. This is only with Firefox Quantum

@lock lock bot locked as resolved and limited conversation to collaborators May 26, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants