[Pkg-javascript-commits] [backbone] 15/23: Fixed back button issue then open pushState link in browser without pushState support

Jonas Smedegaard js at moszumanska.debian.org
Sat May 3 17:00:44 UTC 2014


This is an automated email from the git hooks/post-receive script.

js pushed a commit to tag 0.5.1
in repository backbone.

commit c87460ebf3e0d237bc7cb5b7d0cfd1b46a1891ff
Author: Asan Usipov <discopalevo at gmail.com>
Date:   Mon Jul 4 19:02:27 2011 +0400

    Fixed back button issue then open pushState link in browser without pushState support
---
 backbone.js | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/backbone.js b/backbone.js
index d059d5f..126fbd7 100644
--- a/backbone.js
+++ b/backbone.js
@@ -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);

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-javascript/backbone.git



More information about the Pkg-javascript-commits mailing list