Issue #1216776 by illmasterc, dawehner, Niklas Fiekas: Fixed Two nested contextual links regions are active, when the outer region is hovered.

8.0.x
catch 2012-04-06 14:35:09 +09:00
parent 7be4a6abcb
commit 9b762dbf1d
2 changed files with 5 additions and 2 deletions

View File

@ -13,8 +13,7 @@
display: none;
}
.contextual-region:hover .contextual,
.contextual-region:hover .trigger,
.contextual-active .trigger,
.contextual-region:hover .contextual-links-trigger-active,
.contextual-active .contextual-links {
display: block;
}

View File

@ -30,6 +30,10 @@ Drupal.behaviors.contextualLinks = {
);
// Hide the contextual links when user clicks a link or rolls out of the .contextual-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);
});