diff --git a/core/themes/seven/css/components/system-status-report.css b/core/themes/seven/css/components/system-status-report.css index 5d1940c..16c92b9 100644 --- a/core/themes/seven/css/components/system-status-report.css +++ b/core/themes/seven/css/components/system-status-report.css @@ -110,12 +110,6 @@ html:not(.details) .system-status-report__status-title { content: ''; clear: both; } - .system-status-report details > summary { - cursor: default; - } - .system-status-report details > summary:hover { - text-decoration: none; - } .system-status-report details > summary:first-child { width: 18rem; float: left; /* LTR */ diff --git a/core/themes/seven/js/responsive-details.js b/core/themes/seven/js/responsive-details.js index 4f921bb..587d124 100644 --- a/core/themes/seven/js/responsive-details.js +++ b/core/themes/seven/js/responsive-details.js @@ -17,29 +17,32 @@ */ Drupal.behaviors.responsiveDetails = { attach: function (context) { - var $statusDetails = $(context).find('details').once('responsive-details'); - var mql = window.matchMedia('(min-width:48em)'); - - mql.addListener(handleResize); - handleResize(mql, $statusDetails); + $(context).find('details').once('responsive-details').each(init); } }; - function handleResize(mql, statusDetails) { - if (mql.matches) { - statusDetails + function init(i, detailElement) { + var mql = window.matchMedia('(min-width:48em)'); + mql.addListener(function() { + handleResize(mql, detailElement); + }); + handleResize(mql, detailElement); + + function handleResize(mql, detail) { + var $detail = $(detail); + if (mql.matches) { + $detail .attr('open', true) .children('summary') - .attr('aria-expanded', true) - .on('click.details-open', false); - } - else { - // If user explicitly opened one, leave it alone. - statusDetails.find('summary[aria-pressed!=true]') + .attr('aria-expanded', true); + } + else { + // If user explicitly opened one, leave it alone. + $detail.find('summary[aria-pressed!=true]') .attr('aria-expanded', false) - .off('.details-open') .parent('details') .attr('open', false); + } } }