Commit 2f9fd675 authored by webchick's avatar webchick
Browse files

#668104 follow-up by casey and pwolanin: Fixes + revised comments for overlay-exclude class.

parent a2c946e5
......@@ -680,16 +680,19 @@ Drupal.overlay.clickHandler = function (event) {
return;
}
// Only continue if clicked target (or one of its parents) is a link and does
// not have class overlay-exclude. The overlay-exclude class allows to prevent
// opening a link in the overlay.
if (!$target.is('a') || $target.hasClass('overlay-exclude')) {
// Only continue if clicked target (or one of its parents) is a link.
if (!$target.is('a')) {
$target = $target.closest('a');
if (!$target.length) {
return;
}
}
// Never open links in the overlay that contain the overlay-exclude class.
if ($target.hasClass('overlay-exclude')) {
return;
}
var href = $target.attr('href');
// Only continue if link has an href attribute and is not just linking to
// an anchor.
......
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