mirror of
https://github.com/Hopiu/jquery-mobile.git
synced 2026-03-17 06:20:26 +00:00
if no hash is present, run a replacestate. All nav tests still passing.
This commit is contained in:
parent
7b122cacfc
commit
b438472fec
1 changed files with 5 additions and 0 deletions
|
|
@ -60,6 +60,11 @@
|
|||
|
||||
// Handle popstate events the occur through history changes
|
||||
$win.bind( "popstate", self.onPopState );
|
||||
|
||||
// if there's no hash, we need to replacestate for returning to home
|
||||
if( location.hash === "" ){
|
||||
history.replaceState( { hash: location.hash, title: document.title }, document.title, location.href );
|
||||
}
|
||||
|
||||
// Enable pushstate listening *after window onload
|
||||
// To ignore the initial pop that Chrome calls at onload
|
||||
|
|
|
|||
Loading…
Reference in a new issue