Fix issue 1913 - unnecessary ajax call and duplicate DOM nodes when refreshing a page with a dialog visible

This commit is contained in:
Martin Sutherland 2011-06-23 18:33:06 +02:00
parent c81b8cc181
commit 83973b429b

View file

@ -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, "" );
}