Browse files

[navigation] Keep urlHistory in sync with browser history even when m…

…oving to/from a #&ui-state=dialog link via Back/Forward buttons
  • Loading branch information...
1 parent c64c1a4 commit 851fad0debfbc50deb47d96d6d03de9257aa6756 @gabrielschulhof committed Apr 18, 2012
Showing with 10 additions and 0 deletions.
  1. +10 −0 js/jquery.mobile.navigation.js
View
10 js/jquery.mobile.navigation.js
@@ -1003,6 +1003,16 @@ define( [
if( fromPage && fromPage[0] === toPage[0] && !settings.allowSamePageTransition ) {
isPageTransitioning = false;
mpc.trigger( "pagechange", triggerData );
+
+ // Even if there is no page change to be done, we should keep the urlHistory in sync with the hash changes
+ if( settings.fromHashChange ) {
+ urlHistory.directHashChange({
+ currentUrl: url,
+ isBack: function() {},
+ isForward: function() {}
+ });
+ }
+
return;
}

0 comments on commit 851fad0

Please sign in to comment.