From a0978e8222e09acaf41788cbd4eadae3b60879bc Mon Sep 17 00:00:00 2001 From: Andrea Fercia Date: Thu, 17 Jan 2019 12:07:32 +0000 Subject: [PATCH] Media: Improve unselecting media in the media bulk selection mode. Disables the "Delete Selected" button when unselecting media by clicking the "checkmark" box in the media bulk selection mode. Props subrataemfluence, adamsilverstein. Fixes #42239. git-svn-id: https://develop.svn.wordpress.org/trunk@44640 602fd350-edb4-49c9-b593-d223f7449a82 --- src/js/media/views/attachment.js | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/js/media/views/attachment.js b/src/js/media/views/attachment.js index 3c93d597b1..240f05c0ee 100644 --- a/src/js/media/views/attachment.js +++ b/src/js/media/views/attachment.js @@ -509,6 +509,9 @@ Attachment = View.extend(/** @lends wp.media.view.Attachment.prototype */{ } else { selection.add( this.model ); } + + // Trigger an action button update. + this.controller.trigger( 'selection:toggle' ); } });