Skip to content
This repository was archived by the owner on Oct 8, 2021. It is now read-only.

Commit ff24eb6

Browse files
author
Gabriel Schulhof
committed
Navigation: Save the initial hash key in urlHistory
1 parent 2f25782 commit ff24eb6

File tree

2 files changed

+2
-5
lines changed

2 files changed

+2
-5
lines changed

js/jquery.mobile.navigation.js

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1196,11 +1196,6 @@ define( [
11961196
transition: (urlHistory.getLast() || {}).transition || transition
11971197
});
11981198

1199-
// TODO we can set this earlier and avoid checking it every time we run the hashchange
1200-
if ( 0 === urlHistory.stack.length ) {
1201-
urlHistory.initialDst = to;
1202-
}
1203-
12041199
// special case for dialogs
12051200
if ( urlHistory.stack.length > 1 && to.indexOf( dialogHashKey ) > -1 && urlHistory.initialDst !== to ) {
12061201

js/navigation/navigate.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -269,6 +269,8 @@ define([
269269
// Each has a url and optional transition, title, and pageUrl (which represents the file path, in cases where URL is obscured, such as dialogs)
270270
stack: [],
271271

272+
initialDst: $.mobile.path.parseLocation().hash,
273+
272274
//maintain an index number for the active page in the stack
273275
activeIndex: 0,
274276

0 commit comments

Comments
 (0)