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

Commit fbd7288

Browse files
author
Gabriel Schulhof
committed
Popup: Generate history entry when opening from an initial URL containing a hash key
1 parent 81a57c8 commit fbd7288

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

js/widgets/popup.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -776,12 +776,12 @@ define( [
776776
}
777777

778778
// cache some values for min/readability
779+
urlHistory = $.mobile.urlHistory;
779780
hashkey = $.mobile.dialogHashKey;
780781
activePage = $.mobile.activePage;
781782
currentIsDialog = activePage.is( ".ui-dialog" );
782-
this._myUrl = url = $.mobile.urlHistory.getActive().url;
783-
hasHash = ( url.indexOf( hashkey ) > -1 ) && !currentIsDialog;
784-
urlHistory = $.mobile.urlHistory;
783+
this._myUrl = url = urlHistory.getActive().url;
784+
hasHash = ( url.indexOf( hashkey ) > -1 ) && !currentIsDialog && ( urlHistory.activeIndex > 0 );
785785

786786
if ( hasHash ) {
787787
self._open( options );

0 commit comments

Comments
 (0)