Fixed back button issue then open pushState link in browser without pushState support

This commit is contained in:
Asan Usipov
2011-07-04 19:02:27 +04:00
parent cbefdb8a55
commit c87460ebf3

View File

@@ -805,7 +805,7 @@
var atRoot = loc.pathname == this.options.root;
if (this._wantsPushState && !this._hasPushState && !atRoot) {
this.fragment = this.getFragment(null, true);
window.location = this.options.root + '#' + this.fragment;
window.location.replace(this.options.root + '#' + this.fragment);
} else if (this._wantsPushState && this._hasPushState && atRoot && loc.hash) {
this.fragment = loc.hash.replace(hashStrip, '');
window.history.replaceState({}, document.title, loc.protocol + '//' + loc.host + this.options.root + this.fragment);