Skip to content

Commit 44eaf77

Browse files
committed
fix broken hash on dialog after initial page load
1 parent af0e1f5 commit 44eaf77

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

js/jquery.mobile.navigation.js

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -917,7 +917,11 @@
917917
// for the dialog content to be used in the hash. Instead, we want
918918
// to append the dialogHashKey to the url of the current page.
919919
if ( isDialog && active ) {
920-
url = active.url + dialogHashKey;
920+
// on the initial page load active.url is undefined and in that case should
921+
// be an empty string. Moving the undefined -> empty string back into
922+
// urlHistory.addNew seemed imprudent given undefined better represents
923+
// the url state
924+
url = ( active.url || "" ) + dialogHashKey;
921925
}
922926

923927
// Set the location hash.

0 commit comments

Comments
 (0)