diff --git a/core/modules/toolbar/js/toolbar.menu.js b/core/modules/toolbar/js/toolbar.menu.js index 0892a5e..40ce802 100644 --- a/core/modules/toolbar/js/toolbar.menu.js +++ b/core/modules/toolbar/js/toolbar.menu.js @@ -38,14 +38,18 @@ } /** - * Handle clicks from any toolbar-box link to decide whether to hide or show the menu. + * Handle clicks from a menu item link. * * @param {Object} event * A jQuery Event object. */ function linkClickHandler(event) { - // If the menu is fixed and blocking anything on the page, then don't set disable the active tab after clicking. - if (!Drupal.toolbar.models.toolbarModel.attributes.isFixed) { + // If the toolbar is positioned fixed (and therefore hiding content + // underneath), then users expect clicks in the administration menu tray + // to take them to that destination but for the menu tray to be closed + // after clicking: otherwise the toolbar itself is obstructing the view + // of the destination they chose. + if (!Drupal.toolbar.models.toolbarModel.get('isFixed')) { Drupal.toolbar.models.toolbarModel.set('activeTab', null); } }