summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAngie Byron <webchick@24967.no-reply.drupal.org>2010-02-10 05:50:49 +0000
committerAngie Byron <webchick@24967.no-reply.drupal.org>2010-02-10 05:50:49 +0000
commit2f9fd67579a7d9db2853839dd6588d992a03fa69 (patch)
tree54f6eab9229aa3817b32e3df854332f515a94f9e
parenta2c946e5e96b23d806f24853cdb33e59911b1b1a (diff)
downloadbrdo-2f9fd67579a7d9db2853839dd6588d992a03fa69.tar.gz
brdo-2f9fd67579a7d9db2853839dd6588d992a03fa69.tar.bz2
#668104 follow-up by casey and pwolanin: Fixes + revised comments for overlay-exclude class.
-rw-r--r--modules/overlay/overlay-parent.js11
1 files changed, 7 insertions, 4 deletions
diff --git a/modules/overlay/overlay-parent.js b/modules/overlay/overlay-parent.js
index ddac5633f..ab013f6d6 100644
--- a/modules/overlay/overlay-parent.js
+++ b/modules/overlay/overlay-parent.js
@@ -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.