From 83973b429b635db1f1a6667eda73c37b4d8838da Mon Sep 17 00:00:00 2001 From: Martin Sutherland Date: Thu, 23 Jun 2011 18:33:06 +0200 Subject: [PATCH] Fix issue 1913 - unnecessary ajax call and duplicate DOM nodes when refreshing a page with a dialog visible --- js/jquery.mobile.navigation.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/js/jquery.mobile.navigation.js b/js/jquery.mobile.navigation.js index b320db83..08c1a81f 100644 --- a/js/jquery.mobile.navigation.js +++ b/js/jquery.mobile.navigation.js @@ -156,7 +156,9 @@ convertUrlToDataUrl: function( absUrl ) { var u = path.parseUrl( absUrl ); if ( path.isEmbeddedPage( u ) ) { - return u.hash.replace( /^#/, "" ); + // For embedded pages, remove the dialog hash key as in getFilePath(), + // otherwise the Data Url won't match the id of the embedded Page. + return u.hash.split( dialogHashKey )[0].replace( /^#/, "" ); } else if ( path.isSameDomain( u, documentBase ) ) { return u.hrefNoHash.replace( documentBase.domain, "" ); }