summaryrefslogtreecommitdiff
path: root/modules/contextual
diff options
context:
space:
mode:
authorDavid Rothstein <drothstein@gmail.com>2013-08-05 04:13:31 -0400
committerDavid Rothstein <drothstein@gmail.com>2013-08-05 04:13:31 -0400
commitc2a570914a0c259d7d9d34776b25788c01be5ab1 (patch)
treeaf78a3df73fac68a17943fa6105529d1a47ecf41 /modules/contextual
parentaf8d800579001b3928b4fa90f90ea5efe2785dcb (diff)
downloadbrdo-c2a570914a0c259d7d9d34776b25788c01be5ab1.tar.gz
brdo-c2a570914a0c259d7d9d34776b25788c01be5ab1.tar.bz2
Issue #1216776 by illmasterc, Niklas Fiekas, dawehner: Fixed Two nested contextual links regions are active, when the outer region is hovered.
Diffstat (limited to 'modules/contextual')
-rw-r--r--modules/contextual/contextual.css2
-rw-r--r--modules/contextual/contextual.js4
2 files changed, 5 insertions, 1 deletions
diff --git a/modules/contextual/contextual.css b/modules/contextual/contextual.css
index 3829328c7..93a179630 100644
--- a/modules/contextual/contextual.css
+++ b/modules/contextual/contextual.css
@@ -77,7 +77,7 @@ div.contextual-links-wrapper ul.contextual-links {
-webkit-border-top-left-radius: 4px; /* LTR */
border-radius: 4px 0 4px 4px; /* LTR */
}
-.contextual-links-region:hover a.contextual-links-trigger,
+a.contextual-links-trigger-active,
div.contextual-links-active a.contextual-links-trigger,
div.contextual-links-active ul.contextual-links {
display: block;
diff --git a/modules/contextual/contextual.js b/modules/contextual/contextual.js
index ebe509137..4339780ed 100644
--- a/modules/contextual/contextual.js
+++ b/modules/contextual/contextual.js
@@ -30,6 +30,10 @@ Drupal.behaviors.contextualLinks = {
);
// Hide the contextual links when user clicks a link or rolls out of the .contextual-links-region.
$region.bind('mouseleave click', Drupal.contextualLinks.mouseleave);
+ $region.hover(
+ function() { $trigger.addClass('contextual-links-trigger-active'); },
+ function() { $trigger.removeClass('contextual-links-trigger-active'); }
+ );
// Prepend the trigger.
$wrapper.prepend($trigger);
});