From 9cfa2008915b6e8c9d201d91a8c6342ddab84a40 Mon Sep 17 00:00:00 2001 From: Konstantin Obenland Date: Mon, 3 Oct 2016 18:38:43 +0000 Subject: [PATCH] wpLists: Pass the current element to `process()` to properly register event handlers. Fixes a bug where new categories couldn't be added from the post edit screen. Introduced in [38599]. Props dlh. Fixes #38174. git-svn-id: https://develop.svn.wordpress.org/trunk@38711 602fd350-edb4-49c9-b593-d223f7449a82 --- src/wp-includes/js/wp-lists.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/wp-includes/js/wp-lists.js b/src/wp-includes/js/wp-lists.js index 06ad911e4d..c73471dbcb 100644 --- a/src/wp-includes/js/wp-lists.js +++ b/src/wp-includes/js/wp-lists.js @@ -789,8 +789,8 @@ wpList = { init: function() { var $list = this; - $list.wpList.process = function() { - $list.each( function( index, element ) { + $list.wpList.process = function( element ) { + $list.each( function() { this.wpList.process( element ); } ); };