summaryrefslogtreecommitdiff
path: root/modules/overlay
diff options
context:
space:
mode:
Diffstat (limited to 'modules/overlay')
-rw-r--r--modules/overlay/overlay-parent.js7
1 files changed, 3 insertions, 4 deletions
diff --git a/modules/overlay/overlay-parent.js b/modules/overlay/overlay-parent.js
index a3e9d017d..bb3fc08d1 100644
--- a/modules/overlay/overlay-parent.js
+++ b/modules/overlay/overlay-parent.js
@@ -509,12 +509,11 @@ Drupal.overlay.eventhandlerOverrideLink = function (event) {
// which is the default action for a link. We only need to handle them
// if the overlay is open and the clicked link is inside the overlay iframe.
else if (this.isOpen && target.ownerDocument === this.iframeWindow.document) {
- // Open external links in a new window.
+ // Open external links in the immediate parent of the frame, unless the
+ // link already has a different target.
if (target.hostname != window.location.hostname) {
- // Add a target attribute to the clicked link. This is being picked up by
- // the default action handler.
if (!$target.attr('target')) {
- $target.attr('target', '_new');
+ $target.attr('target', '_parent');
}
}
else {