Commit cd08bfa0 authored by Dries's avatar Dries

- Patch #667012 by ksenzee, casey, David_Rothstein: remove the opening of...

- Patch #667012 by ksenzee, casey, David_Rothstein: remove the opening of external links in a new browser window.
parent 89055449
...@@ -509,12 +509,11 @@ Drupal.overlay.eventhandlerOverrideLink = function (event) { ...@@ -509,12 +509,11 @@ Drupal.overlay.eventhandlerOverrideLink = function (event) {
// which is the default action for a link. We only need to handle them // 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. // if the overlay is open and the clicked link is inside the overlay iframe.
else if (this.isOpen && target.ownerDocument === this.iframeWindow.document) { 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) { 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')) { if (!$target.attr('target')) {
$target.attr('target', '_new'); $target.attr('target', '_parent');
} }
} }
else { else {
......
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