diff options
author | Dries Buytaert <dries@buytaert.net> | 2010-05-28 19:11:42 +0000 |
---|---|---|
committer | Dries Buytaert <dries@buytaert.net> | 2010-05-28 19:11:42 +0000 |
commit | 1e9409ade139eb8addd633c081e8f8a9800ca622 (patch) | |
tree | 72385a82969335baaf1e3b81201a1db5d303b22a /modules | |
parent | 78d4c09459af8e50174429b36182c3276230ded3 (diff) | |
download | brdo-1e9409ade139eb8addd633c081e8f8a9800ca622.tar.gz brdo-1e9409ade139eb8addd633c081e8f8a9800ca622.tar.bz2 |
- Patch #690288 by casey, klausi: back button in overlay doesn't work properly when there's redirection, e.g. #admin/structure/trigger.
Diffstat (limited to 'modules')
-rw-r--r-- | modules/overlay/overlay-parent.js | 8 |
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); } }; |