removed extra replace state fire, need to check with @scottjehl

This commit is contained in:
John Bender 2011-08-18 16:25:21 -07:00
parent ef52c8d312
commit 2c3d9bc2f1

View file

@ -31,7 +31,7 @@
var hash = location.hash || self.initialFilePath, href;
// make the hash abolute with the current href
href = $.mobile.path.makeUrlAbsolute( hash.replace("#", "") , location.href );
href = $.mobile.path.makeUrlAbsolute( hash.replace("#", ""), location.href );
// replace the current url with the new href and store the state
history.replaceState( { hash: hash, title: document.title }, document.title, href );
@ -56,14 +56,11 @@
},
init: function() {
$win.bind( "hashchange replacehash", self.onHashAlter );
$win.bind( "hashchange", self.onHashAlter );
// Handle popstate events the occur through history changes
$win.bind( "popstate", self.onPopState );
// Replace the hash before pushstate listening is enabled
$win.trigger( "replacehash" );
// Enable pushstate listening *after window onload
// To ignore the initial pop that Chrome calls at onload
$win.load(function() {