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

Can't go back after use the replaceState #68

Open
Smolky opened this issue Feb 26, 2015 · 3 comments
Open

Can't go back after use the replaceState #68

Smolky opened this issue Feb 26, 2015 · 3 comments
Labels

Comments

@Smolky
Copy link

Smolky commented Feb 26, 2015

Hi. I think there is a conflict with hasherjs and window.replaceState

This is my code:

hasher.setHash ('list');   // http://www.myexample.com/#list
hasher.setHash ('detail'); // http://www.myexample.com/#detail
window.history.replaceState ('', '', 'nice-url-to-allow-copy-paste.html#detail'); // http://www.myexample.com/nice-url-to-allow-copy-paste.html#detail

Everything goes fine until I press the back button on the browser (Chrome) and the parseHash function is not called again

(The parseHash function is the one of the examples)

function parseHash (newHash, oldHash) {
    ...
}

It's binded this way
hasher.changed.add (parseHash);
hasher.initialized.add (parseHash);

Thanks!

@millermedeiros
Copy link
Owner

which browser are you using?

@millermedeiros
Copy link
Owner

maybe this is related to #48 ?

@Smolky
Copy link
Author

Smolky commented Feb 26, 2015

Hi. The browser is:
Google Chrome Versión 40.0.2214.115 m

I'll check #48 as soon as I can to see if I can provide useful information. Thanks again and good work

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