summaryrefslogtreecommitdiff
path: root/modules
diff options
context:
space:
mode:
Diffstat (limited to 'modules')
-rw-r--r--modules/overlay/overlay-parent.js8
1 files changed, 5 insertions, 3 deletions
diff --git a/modules/overlay/overlay-parent.js b/modules/overlay/overlay-parent.js
index f4688af69..64219b782 100644
--- a/modules/overlay/overlay-parent.js
+++ b/modules/overlay/overlay-parent.js
@@ -862,8 +862,9 @@ Drupal.overlay.fragmentizeLink = function (link) {
// true to prevent transforming this link into a clean URL while clean URLs
// may be disabled.
var path = self.getPath(link, true);
- // Preserve existing query and fragment parameters in the URL.
- var destination = path + link.search + link.hash;
+ // Preserve existing query and fragment parameters in the URL, except for
+ // "render=overlay" which is re-added in Drupal.overlay.hashchangeHandler.
+ var destination = path + link.search.replace(/&?render=overlay/, '').replace(/\?$/, '') + link.hash;
// Assemble and return the overlay-ready link.
return $.param.fragment(window.location.href, { overlay: destination });
@@ -892,7 +893,8 @@ Drupal.overlay.syncChildLocation = function (childLocation) {
// Set a 'redirect' flag on the new location so the hashchange event handler
// knows not to change the overlay's content.
$.data(window.location, newLocation, 'redirect');
- window.location.href = newLocation;
+ // Using location.replace so we don't create an extra history entry.
+ window.location.replace(newLocation);
}
};