Skip to content

Commit 2c3d9bc

Browse files
committed
removed extra replace state fire, need to check with @scottjehl
1 parent ef52c8d commit 2c3d9bc

File tree

1 file changed

+2
-5
lines changed

1 file changed

+2
-5
lines changed

js/jquery.mobile.navigation.pushstate.js

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@
3131
var hash = location.hash || self.initialFilePath, href;
3232

3333
// make the hash abolute with the current href
34-
href = $.mobile.path.makeUrlAbsolute( hash.replace("#", "") , location.href );
34+
href = $.mobile.path.makeUrlAbsolute( hash.replace("#", ""), location.href );
3535

3636
// replace the current url with the new href and store the state
3737
history.replaceState( { hash: hash, title: document.title }, document.title, href );
@@ -56,14 +56,11 @@
5656
},
5757

5858
init: function() {
59-
$win.bind( "hashchange replacehash", self.onHashAlter );
59+
$win.bind( "hashchange", self.onHashAlter );
6060

6161
// Handle popstate events the occur through history changes
6262
$win.bind( "popstate", self.onPopState );
6363

64-
// Replace the hash before pushstate listening is enabled
65-
$win.trigger( "replacehash" );
66-
6764
// Enable pushstate listening *after window onload
6865
// To ignore the initial pop that Chrome calls at onload
6966
$win.load(function() {

0 commit comments

Comments
 (0)