From 2f4a7a42b72d371d866e3812e3538b75085ef084 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: http://core.svn.wordpress.org/trunk@21908 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- 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;