From 3de3ed85fd78d00c6efe819f0f3c6655fec8d415 Mon Sep 17 00:00:00 2001 From: Daryl Koopersmith Date: Wed, 19 Sep 2012 01:00:34 +0000 Subject: [PATCH] Media JS: Prevent infinite scroll events from being unbound when Attachments views are re-rendered. see #21390. git-svn-id: https://develop.svn.wordpress.org/trunk@21908 602fd350-edb4-49c9-b593-d223f7449a82 --- wp-includes/js/media-views.js | 3 +++ 1 file changed, 3 insertions(+) diff --git a/wp-includes/js/media-views.js b/wp-includes/js/media-views.js index fe93e5d2e8..6da5cb366b 100644 --- a/wp-includes/js/media-views.js +++ b/wp-includes/js/media-views.js @@ -540,6 +540,9 @@ }, render: function() { + // Detach the list from the DOM to prevent event removal. + this.$list.detach(); + this.$el.html( this.template( this.options ) ).append( this.$list ); this.refresh(); return this;