Commit 69d530a0 authored by catch's avatar catch
Browse files

Issue #1006042 by ksenzee, grendzy: Fixed Links outside the overlay with...

Issue #1006042 by ksenzee, grendzy: Fixed Links outside the overlay with existing fragments are broken.
parent 8e7a80bb
......@@ -600,7 +600,14 @@ Drupal.overlay.eventhandlerOverrideLink = function (event) {
else {
// Add the overlay-context state to the link, so "overlay-restore" links
// can restore the context.
$target.attr('href', $.param.fragment(href, { 'overlay-context': this.getPath(window.location) + window.location.search }));
if ($target[0].hash) {
// Leave links with an existing fragment alone. Adding an extra
// parameter to a link like "node/1#section-1" breaks the link.
}
else {
// For links with no existing fragment, add the overlay context.
$target.attr('href', $.param.fragment(href, { 'overlay-context': this.getPath(window.location) + window.location.search }));
}
// When the link has a destination query parameter and that destination
// is an admin link we need to fragmentize it. This will make it reopen
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment