diff --git a/core/modules/system/system.modules.js b/core/modules/system/system.modules.js index ad8fa23..9ca9f85 100644 --- a/core/modules/system/system.modules.js +++ b/core/modules/system/system.modules.js @@ -38,12 +38,18 @@ Drupal.behaviors.tableFilterByText = { if (query.length >= 2) { $rows.each(showModuleRow); - // Hide the package
if they don't have any visible rows. // Note that we first open all
to be able to use ':visible'. + // Mark the
elements that were closed before filtering, so + // they can be reclosed when filtering is removed. + $details.not('[open]').attr('data-drupal-system-state', 'forced-open'); + // Hide the package
if they don't have any visible rows. $details.attr('open', 'open').each(hidePackageDetails); } else { $rowsAndDetails.show(); + // Return
elements that had been closed before filtering + // to a closed state. + $details.filter('[data-drupal-system-state="forced-open"]').removeAttr('open data-drupal-system-state'); } }