diff --git a/core/misc/collapse.js b/core/misc/collapse.js
index 5622d08..6ed85fc 100644
--- a/core/misc/collapse.js
+++ b/core/misc/collapse.js
@@ -5,15 +5,9 @@
 /**
  * The collapsible details object represents a single collapsible details element.
  */
-function CollapsibleDetails(node, settings) {
+function CollapsibleDetails (node) {
   this.$node = $(node);
   this.$node.data('details', this);
-  this.settings = $.extend({
-      duration:'fast',
-      easing:'linear'
-    },
-    settings
-  );
   // Expand details if there are errors inside, or if it contains an
   // element that is targeted by the URI fragment identifier.
   var anchor = location.hash && location.hash !== '#' ? ', ' + location.hash : '';
@@ -41,16 +35,12 @@ $.extend(CollapsibleDetails, {
  */
 $.extend(CollapsibleDetails.prototype, {
   /**
-   * Flag preventing multiple simultaneous animations.
-   */
-  animating: false,
-  /**
    * Initialize and setup summary events and markup.
    */
   setupSummary: function () {
     this.$summary = $('<span class="summary"></span>');
     this.$node
-      .bind('summaryUpdated', $.proxy(this.onSummaryUpdated, this))
+      .on('summaryUpdated', $.proxy(this.onSummaryUpdated, this))
       .trigger('summaryUpdated');
   },
   /**
@@ -91,59 +81,26 @@ $.extend(CollapsibleDetails.prototype, {
    * Toggle the visibility of a details element using smooth animations.
    */
   toggle: function () {
-    // Don't animate multiple times.
-    if (this.animating) {
-      return;
-    }
     if (!this.$node.attr('open')) {
-      var $content = this.$node.find('> .details-wrapper').hide();
-      this.$node
-        .trigger({ type:'collapsed', value:false })
-        .find('> summary span.details-summary-prefix').html(Drupal.t('Hide'));
-      $content.slideDown(
-        $.extend(this.settings, {
-          complete:$.proxy(this.onCompleteSlideDown, this)
-        })
-      );
+      this.$node.find('> summary span.details-summary-prefix').html(Drupal.t('Hide'));
+      this.$node.attr('open', true);
     }
     else {
-      this.$node.trigger({ type:'collapsed', value:true });
-      this.$node.find('> .details-wrapper').slideUp(
-        $.extend(this.settings, {
-          complete:$.proxy(this.onCompleteSlideUp, this)
-        })
-      );
+      this.$node.attr('open', false);
+      this.$node.find('> summary span.details-summary-prefix').html(Drupal.t('Show'));
     }
-  },
-  /**
-   * Completed opening details element.
-   */
-  onCompleteSlideDown: function () {
-    this.$node.attr('open', true);
-    this.$node.trigger('completeSlideDown');
-    this.animating = false;
-  },
-  /**
-   * Completed closing details element.
-   */
-  onCompleteSlideUp: function () {
-    this.$node.attr('open', false);
-    this.$node
-      .find('> summary span.details-summary-prefix').html(Drupal.t('Show'));
-    this.$node.trigger('completeSlideUp');
-    this.animating = false;
   }
 });
 
 Drupal.behaviors.collapse = {
-  attach: function (context, settings) {
+  attach: function (context) {
     if (Modernizr.details) {
       return;
     }
     var $collapsibleDetails = $(context).find('details').once('collapse');
     if ($collapsibleDetails.length) {
       for (var i = 0; i < $collapsibleDetails.length; i++) {
-        CollapsibleDetails.instances.push(new CollapsibleDetails($collapsibleDetails[i], settings.collapsibleDetails));
+        CollapsibleDetails.instances.push(new CollapsibleDetails($collapsibleDetails[i]));
       }
     }
   }
diff --git a/core/modules/system/system.modules.js b/core/modules/system/system.modules.js
index 4d97652..c9ec8fd 100644
--- a/core/modules/system/system.modules.js
+++ b/core/modules/system/system.modules.js
@@ -38,12 +38,20 @@ Drupal.behaviors.tableFilterByText = {
       if (query.length >= 2) {
         $rows.each(showModuleRow);
 
+        // Note that we first open all <details> to be able to use ':visible'.
+        // Mark the <details> 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 <details> if they don't have any visible rows.
-        // Note that we first show() all <details> to be able to use ':visible'.
-        $details.show().each(hidePackageDetails);
+        $details.attr('open', true).each(hidePackageDetails);
       }
       else {
         $rowsAndDetails.show();
+        // Return <details> elements that had been closed before filtering
+        // to a closed state.
+        $details.filter('[data-drupal-system-state="forced-open"]')
+          .removeAttr('data-drupal-system-state')
+          .attr('open', false);
       }
     }
 
