 core/modules/contextual/contextual.js |    6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/core/modules/contextual/contextual.js b/core/modules/contextual/contextual.js
index aa80b31..1cdeb2e 100644
--- a/core/modules/contextual/contextual.js
+++ b/core/modules/contextual/contextual.js
@@ -67,7 +67,7 @@ Drupal.contextual.prototype.init = function() {
 
   // The trigger behaviors are never detached or mutated.
   this.$region
-    .on('click.contextual', '.contextual .trigger', $.proxy(this.triggerClickHandler, this))
+    .on('click.contextual', '.contextual .trigger:first', $.proxy(this.triggerClickHandler, this))
     .on('mouseleave.contextual', '.contextual', {show: false}, $.proxy(this.triggerLeaveHandler, this));
   // Attach highlight behaviors.
   this.attachHighlightBehaviors();
@@ -128,6 +128,8 @@ Drupal.contextual.prototype.highlightRegion = function(event) {
  */
 Drupal.contextual.prototype.triggerClickHandler = function (event) {
   event.preventDefault();
+  // Hide all nested contextual triggers while the links are shown for this one.
+  this.$region.find('.contextual .trigger:not(:first)').hide();
   this.showLinks();
 };
 
@@ -139,6 +141,8 @@ Drupal.contextual.prototype.triggerClickHandler = function (event) {
  */
 Drupal.contextual.prototype.triggerLeaveHandler = function (event) {
   var show = event && event.data && event.data.show;
+  // Show all nested contextual triggers when the links are hidden for this one.
+  this.$region.find('.contextual .trigger:not(:first)').show();
   this.showLinks(show);
 };
 
