From aa2b4fd6eded4e229335765c6f87ffc2353f5638 Mon Sep 17 00:00:00 2001 From: Andrew Ozz Date: Fri, 22 Nov 2024 20:08:55 +0000 Subject: [PATCH] Editor: Fix selecting/deselecting multiple unwanted categories when clicking on a Category checkbox on the old Edit Post screen. Props ffffelix, desrosj, ironprogrammer, neotrope, narenin, zaoyao, im3dabasia1, cbravobernal, azaozz. Fixes #62504. git-svn-id: https://develop.svn.wordpress.org/trunk@59454 602fd350-edb4-49c9-b593-d223f7449a82 --- src/js/_enqueues/admin/post.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/js/_enqueues/admin/post.js b/src/js/_enqueues/admin/post.js index 95c2fa0400fe7..3f8b42e261e8b 100644 --- a/src/js/_enqueues/admin/post.js +++ b/src/js/_enqueues/admin/post.js @@ -660,7 +660,7 @@ jQuery( function($) { function() { var t = $(this), c = t.is(':checked'), id = t.val(); if ( id && t.parents('#taxonomy-'+taxonomy).length ) { - $('input[id^="in-' + taxonomy + '-' + id + '"]').prop('checked', c); + $('input#in-' + taxonomy + '-' + id + ', input[id^="in-' + taxonomy + '-' + id + '-"]').prop('checked', c); $('input#in-popular-' + taxonomy + '-' + id).prop('checked', c); } }