summaryrefslogtreecommitdiff
path: root/modules/overlay
diff options
context:
space:
mode:
authorDries Buytaert <dries@buytaert.net>2010-08-18 02:25:50 +0000
committerDries Buytaert <dries@buytaert.net>2010-08-18 02:25:50 +0000
commitcd08bfa070a724138cab78347bc27ed4c76ec8b3 (patch)
tree516cda706653264e64c678a8beae43ab33e87402 /modules/overlay
parent8905544936b046fd49e1697acd9ff633c7d5cf15 (diff)
downloadbrdo-cd08bfa070a724138cab78347bc27ed4c76ec8b3.tar.gz
brdo-cd08bfa070a724138cab78347bc27ed4c76ec8b3.tar.bz2
- Patch #667012 by ksenzee, casey, David_Rothstein: remove the opening of external links in a new browser window.
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 {