diff --git a/src/wp-includes/js/media-views.js b/src/wp-includes/js/media-views.js index 8465281496..c5de8f2c45 100644 --- a/src/wp-includes/js/media-views.js +++ b/src/wp-includes/js/media-views.js @@ -5243,14 +5243,13 @@ return; } + event.preventDefault(); + // In the grid view, bubble up an edit:attachment event to the controller. if ( this.controller.isModeActive( 'grid' ) ) { if ( this.controller.isModeActive( 'edit' ) ) { // Pass the current target to restore focus when closing this.controller.trigger( 'edit:attachment', this.model, event.currentTarget ); - - // Don't scroll the view and don't attempt to submit anything. - event.stopPropagation(); return; } @@ -5270,9 +5269,6 @@ }); this.controller.trigger( 'selection:toggle' ); - - // Don't scroll the view and don't attempt to submit anything. - event.stopPropagation(); }, /** * @param {Object} options