Permalink
Browse files

Prevent next hashchange after the pagebeforechange

event has been canceled due to a hashchange.

This prevents additional calls to changePage.
  • Loading branch information...
1 parent 65705a7 commit 9a3e556183caa155716111f13c09b40bdf5fdec3 @deAtog committed Apr 23, 2012
Showing with 3 additions and 0 deletions.
  1. +3 −0 js/jquery.mobile.navigation.js
@@ -954,6 +954,9 @@ define( [
var index = urlHistory.indexOf( url );
if( index > -1 && index != urlHistory.activeIndex) {
+ // Prevent the next hashchange
+ urlHistory.ignoreNextHashChange = true;
+ // Change the current index in history.
window.history.go(urlHistory.activeIndex - index);
}
}

0 comments on commit 9a3e556

Please sign in to comment.